Skip to content

Commit

Permalink
better update script
Browse files Browse the repository at this point in the history
  • Loading branch information
AccursedGalaxy committed May 31, 2024
1 parent 1f09394 commit 670d979
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dotfiles_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,20 @@ else
exit 1
fi

# Check if the sourcing line is present and uncommented in .zshrc
ZSHRC_PATH="$HOME/.zshrc"
if grep -q "^source $DOTFILES_DIR/zsh/custom.zsh" "$ZSHRC_PATH"; then
print_message "Sourcing line is present and uncommented in .zshrc."
else
if grep -q "^#source $DOTFILES_DIR/zsh/custom.zsh" "$ZSHRC_PATH"; then
print_message "Warning: Sourcing line is present but commented in .zshrc."
else
print_message "Warning: Sourcing line is missing in .zshrc."
fi
fi

# Inform the user to restart their terminal
print_message "Please restart your terminal to apply the updates."
print_message "Make sure the sourcing line in your .zshrc is present and uncommented."

# Optional: Source the updated .zshrc automatically (commented out)
# source $HOME/.zshrc
Expand Down

0 comments on commit 670d979

Please sign in to comment.