fix: install outputs, mise keyrings, termcolor

This commit is contained in:
2026-02-23 08:49:43 -08:00
committed by GitHub
parent b048694363
commit 409bc6fef5
15 changed files with 47 additions and 34 deletions

View File

@@ -55,6 +55,8 @@ let g:netrw_browse_split = 4
set background=dark
if has('termguicolors') && ($COLORTERM ==# 'truecolor' || $COLORTERM ==# '24bit')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif

View File

@@ -1,6 +1,9 @@
# Profiling: ZSH_BENCH=1 zsh
[[ -n "$ZSH_BENCH" ]] && zmodload zsh/zprof
# Upgrade xterm-color to xterm-256color (gh cs ssh sets the weaker value)
[[ "$TERM" == "xterm-color" ]] && export TERM=xterm-256color
# Assume truecolor support if terminal advertises 256color (covers SSH, tmux)
[[ -z "$COLORTERM" && "$TERM" == *256color* ]] && export COLORTERM=truecolor

View File

@@ -8,10 +8,10 @@
log_info "Environment: DOTS_OS=$DOTS_OS, DOTS_PKG=$DOTS_PKG, DOTS_ENV=$DOTS_ENV"
if [[ "$DOTS_OS" == "macos" ]]; then
sw_vers
sw_vers 2>&1 | log_quote
elif [[ "$DOTS_OS" == "linux" ]]; then
if [[ -r /etc/os-release ]]; then
cat /etc/os-release
log_quote < /etc/os-release
fi
if [[ -z "$DOTS_PKG" ]]; then

View File

@@ -15,5 +15,5 @@ if ! command -v brew &> /dev/null; then
else
echo "Homebrew is already installed."
fi
brew --version
brew --version | log_quote
log_pass "Homebrew installed"

View File

@@ -17,10 +17,17 @@ apt_packages=(
wget
)
# Skip if all packages already installed
if dpkg -s "${apt_packages[@]}" &>/dev/null; then
apt --version | log_quote
return 0
fi
sudo apt-get update -qq
sudo apt-get install -qq "${apt_packages[@]}"
unset apt_packages
apt --version
apt --version | log_quote
log_pass "apt packages installed"

View File

@@ -30,6 +30,6 @@ if ! command -v yay &>/dev/null; then
rm -rf /tmp/yay
fi
pacman --version
yay --version
pacman --version | log_quote
yay --version | log_quote
log_pass "pacman packages installed"

View File

@@ -6,7 +6,7 @@
#
# Skip in Codespaces (pre-installed in universal image)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; git --version; return 0; }
[[ "$DOTS_ENV" == "codespaces" ]] && { git --version | log_quote; return 0; }
if ! command -v git &> /dev/null; then
case "$DOTS_PKG" in
@@ -26,5 +26,5 @@ if ! command -v git &> /dev/null; then
esac
fi
git --version
git --version | log_quote
log_pass "git configured"

View File

@@ -24,7 +24,7 @@ if ! command -v zsh &> /dev/null; then
esac
fi
zsh --version
zsh --version | log_quote
# plugin directory (XDG compliant)
PLUGIN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins"
@@ -50,4 +50,3 @@ if [[ "$SHELL" != *zsh ]]; then
sudo usermod -s "$(command -v zsh)" "$(whoami)"
fi
log_pass "zsh configured"

View File

@@ -23,7 +23,7 @@ if ! command -v stow &> /dev/null; then
esac
fi
stow --version
stow --version | log_quote
root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
@@ -43,4 +43,3 @@ stow --dir="$root_dir" --target="$HOME" home
# Bust PATH cache to force regeneration with new profile
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
log_pass "stow linked"

View File

@@ -23,5 +23,5 @@ if ! command -v tmux &> /dev/null; then
esac
fi
tmux -V
log_pass "tmux installed"
tmux -V | log_quote

View File

@@ -15,6 +15,7 @@ if ! command -v mise &>/dev/null; then
;;
apt)
# https://mise.jdx.dev/getting-started.html#apt-debian-ubuntu
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | \
sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | \
@@ -35,7 +36,7 @@ if ! command -v mise &>/dev/null; then
esac
fi
mise --version
echo "mise $(mise --version)" | log_quote
# Skip runtimes in Codespaces (use pre-installed versions)
if [[ "$DOTS_ENV" != "codespaces" ]]; then
@@ -73,7 +74,6 @@ if [[ "$DOTS_ENV" != "codespaces" ]]; then
fi
log_info "Installing apps..."
mise install "${MISE_APPS[@]}"
for tool in "${MISE_APPS[@]}"; do
mise use -g "$tool"
done
@@ -89,6 +89,7 @@ fi
# Verify installations
log_info "Verifying installations..."
{
if [[ "$DOTS_ENV" != "codespaces" ]]; then
mise exec -- python --version
mise exec -- poetry --version
@@ -99,8 +100,9 @@ if [[ "$DOTS_ENV" != "codespaces" ]]; then
echo "firebase: $(mise exec -- firebase --version)"
echo "fastfetch: $(mise exec -- fastfetch --version 2>&1 | head -1)"
fi
fzf --version
echo "fzf $(fzf --version)"
zoxide --version
rg --version | head -1
delta --version | head -1
} | log_quote
log_pass "mise tools installed"

View File

@@ -56,5 +56,5 @@ if ! groups "$USER" | grep -q "\b$docker_group\b"; then
sudo usermod -aG docker "$USER"
fi
docker --version
docker --version | log_quote
log_pass "Docker configured"

View File

@@ -26,5 +26,5 @@ if ! command -v az &>/dev/null; then
esac
fi
az --version
az --version | log_quote
log_pass "Azure CLI installed"

View File

@@ -31,5 +31,5 @@ if ! command -v redis-cli &>/dev/null; then
esac
fi
redis-cli --version
redis-cli --version | log_quote
log_pass "Redis installed"

View File

@@ -32,9 +32,10 @@ log_skip() { echo -e "${GREY}[SKIP]${NC} $*"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
log_error() { echo -e "${RED}[FAIL]${NC} $*"; }
log_debug() { echo -e "${CYAN}$*${NC}"; }
log_quote() { sed "s/^/ ${GREY}│ /" | sed "s/$/${NC}/"; }
# Export log functions
export -f log_info log_pass log_skip log_warn log_error log_debug
export -f log_info log_pass log_skip log_warn log_error log_debug log_quote
printf "\n\t${CYAN} <<< ${CYAN_BOLD}dots${CYAN} >>> ${NC}\n"
printf "\t${GREY}==============${NC}\n\n"