Skip to content

Commit

Permalink
fix: replaced file existence check for shell check (spicetify#1445)
Browse files Browse the repository at this point in the history
* fix: replaced file existence check for shell check

* fix: rollback `fish` change

* add: permissive check for config file
  • Loading branch information
afonsojramos authored Feb 1, 2022
1 parent 502548e commit 0d72f0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ fi
spicetify_install="$HOME/.spicetify"
path="export PATH=\"\$PATH:\$HOME/.spicetify\""

if [[ -f "$HOME/.bashrc" ]] && ! grep -q "$path" "$HOME/.bashrc"; then echo "${path}" >>"$HOME/.bashrc" && echo "SAVING ${spicetify_install} to \$PATH (bash)"; fi
if [[ -f "$HOME/.zshrc" ]] && ! grep -q "$path" "$HOME/.zshrc"; then echo "${path}" >>"$HOME/.zshrc" && echo "SAVING ${spicetify_install} to \$PATH (zsh)"; fi
if (grep -q "bash" $SHELL || [[ -f "$HOME/.bashrc" ]]) && ! grep -q "$path" "$HOME/.bashrc"; then echo "${path}" >>"$HOME/.bashrc" && echo "SAVING ${spicetify_install} to \$PATH (bash)"; fi
if (grep -q "zsh" $SHELL || [[ -f "$HOME/.zshrc" ]]) && ! grep -q "$path" "$HOME/.zshrc"; then echo "${path}" >>"$HOME/.zshrc" && echo "SAVING ${spicetify_install} to \$PATH (zsh)"; fi
if [[ -f "$HOME/.config/fish/config.fish" ]] && ! grep -q "$path" "$HOME/.config/fish/config.fish"; then echo "${path}" >>"$HOME/.config/fish/config.fish" && echo "SAVING ${spicetify_install} to \$PATH (fish)"; fi

exe="$spicetify_install/spicetify"
Expand Down

0 comments on commit 0d72f0f

Please sign in to comment.