From 49f1580f706b49e4f4203416886af58c09f8fff9 Mon Sep 17 00:00:00 2001 From: Afonso Jorge Ramos Date: Tue, 12 Apr 2022 16:56:11 +0100 Subject: [PATCH] chore: add bash_profile fallback for bash (#1583) * chore: add bash_profile fallback for bash * applied suggested changes Co-authored-by: wael444 <40663@protonmail.com> * revert part of the suggested changes Co-authored-by: wael444 <40663@protonmail.com> --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 36ccadcf32..df0532d099 100755 --- a/install.sh +++ b/install.sh @@ -68,7 +68,7 @@ check() { if [ -f $shellrc ]; then if ! grep -q $spicetify_install $shellrc; then echo "APPENDING $spicetify_install to PATH in $shellrc" - echo ${2:-$path} >> $shellrc + echo ${2:-$path} >> $shellrc echo "Restart your shell to have spicetify in your PATH." else echo "spicetify path already set in $shellrc, continuing..." @@ -80,7 +80,10 @@ check() { case $SHELL in *zsh) check ".zshrc" ;; - *bash) check ".bashrc" ;; + *bash) + [ -f "$HOME/.bashrc" ] && check ".bashrc" + [ -f "$HOME/.bash_profile" ] && check ".bash_profile" + ;; *fish) check ".config/fish/config.fish" "fish_add_path $spicetify_install" ;; *) notfound ;; esac