Files
dotfiles/install.d/23-stow.sh
Andrejus cccffa8fae Unify installer colors with vim/shell palette and clean up output
- Replace BLUE/CYAN/CYAN_BOLD with TEAL/TEAL_BOLD (#2CB494) to match
  the primary accent used across vim, zsh prompt, tmux, and fzf
- Update BLUE (#0C48CC -> #4068D4) then merge into TEAL
- Update RED (#F40404 -> #F88C14) to match vim/shell error orange
- Rename GREEN to grey-blue (#7290B8) for [PASS] messages
- Format all raw echo output with log functions or log_quote
- Suppress sudo prompt when credentials are already cached
- Add missing log_pass to 22-zsh.sh and 23-stow.sh
- Convert raw 'already installed' echos to log_skip (7 scripts)
- Pipe SSH key and mise output through log_quote
- Suppress noisy bat cache and mise WARN output
- Match fastfetch colors to palette (teal logo, grey-blue keys)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-18 15:29:02 +00:00

54 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install and run stow.
#
if ! command -v stow &> /dev/null; then
case "$DOTS_PKG" in
apt)
sudo apt-get install -qq stow
;;
pacman)
sudo pacman -S --noconfirm stow
;;
brew)
brew install stow
;;
*)
log_warn "Skipping stow install: no supported package manager found"
return 0
;;
esac
fi
stow --version | log_quote
root_dir=${DOTFILES:-$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")}
rm -f "$HOME/.bash_profile"
rm -f "$HOME/.bashrc"
rm -f "$HOME/.gitconfig"
rm -f "$HOME/.gitconfig.local"
rm -f "$HOME/.profile"
rm -f "$HOME/.zshrc"
rm -f "$HOME/.p10k.zsh"
rm -f "$HOME/.ssh/config"
mkdir -p "$HOME/.config"
mkdir -p "$HOME/.ssh"
stow --dir="$root_dir" --target="$HOME" home
# In Codespaces, remove .gitconfig.local so the auto-provisioned identity is used
if [[ "$DOTS_ENV" == "codespaces" ]]; then
rm -f "$HOME/.gitconfig.local"
fi
# Bust PATH cache to force rebuild with new profile
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/dots/path"
log_pass "stow linked"