From df888eca4db478169bff12fdf28bc7db1e308430 Mon Sep 17 00:00:00 2001 From: Jonas H Date: Sun, 8 Mar 2026 21:34:44 +0100 Subject: [PATCH] stow shenanigans --- install.sh | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/install.sh b/install.sh index 7f0decf..7c07e9f 100755 --- a/install.sh +++ b/install.sh @@ -177,26 +177,6 @@ else echo "JetBrains Mono Nerd Font already installed, skipping." fi -# --------------------------------------------------------------------------- -# Configure shell -# --------------------------------------------------------------------------- - -echo "" -echo "Configuring zsh..." - -# Ensure .zshrc exists -if [[ ! -f "$HOME/.zshrc" ]]; then - touch "$HOME/.zshrc" -fi - -# Ensure starship is initialized in .zshrc -if ! grep -q 'eval "$(starship init zsh)"' "$HOME/.zshrc"; then - echo 'eval "$(starship init zsh)"' >> "$HOME/.zshrc" - echo " Added starship initialization to ~/.zshrc" -else - echo " Starship already configured in ~/.zshrc" -fi - # --------------------------------------------------------------------------- # Stow all packages # --------------------------------------------------------------------------- @@ -243,4 +223,24 @@ for PACKAGE in "$DOTFILES_DIR"/*/; do stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE" done +# --------------------------------------------------------------------------- +# Configure shell (after stowing) +# --------------------------------------------------------------------------- + +echo "" +echo "Configuring zsh..." + +# Ensure .zshrc exists (stow should have created it via symlink) +if [[ ! -f "$HOME/.zshrc" ]]; then + touch "$HOME/.zshrc" +fi + +# Ensure starship is initialized in .zshrc +if ! grep -q 'eval "$(starship init zsh)"' "$HOME/.zshrc"; then + echo 'eval "$(starship init zsh)"' >> "$HOME/.zshrc" + echo " Added starship initialization to ~/.zshrc" +else + echo " Starship already configured in ~/.zshrc" +fi + echo "Done."