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 0f641ac commit 69bb7bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dotfiles_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ 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
EXPECTED_SOURCE="source $HOME/dotfiles/accursedzsh/.zshrc"

if grep -q "^$EXPECTED_SOURCE" "$ZSHRC_PATH"; then
:
else
if grep -q "^#source $DOTFILES_DIR/zsh/custom.zsh" "$ZSHRC_PATH"; then
if grep -q "^#$EXPECTED_SOURCE" "$ZSHRC_PATH"; then
print_message "Warning: Sourcing line is present but commented in .zshrc."
else
print_message "Warning: Sourcing line is missing in .zshrc."
Expand Down

0 comments on commit 69bb7bf

Please sign in to comment.