c1cd9cb1268360f8f95cdc904fd9106063754620

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #3049 from strycore/master

Prevent chsh from running when $SHELL is already zsh

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index 3ff897a01e3f8234936cf694297529323c504167..a53ac48aba43d5c602809a40d02bc0d5bbd75d71 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -32,8 +32,10 @@ sed -i -e "/export PATH=/ c\\
 6 export PATH=\"$PATH\"
 7 " ~/.zshrc
 8 
 9-echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
10-chsh -s `which zsh`
11+if [ "$SHELL" != "$(which zsh)" ]; then
12+    echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
13+    chsh -s `which zsh`
14+fi
15 
16 echo "\033[0;32m"'         __                                     __   '"\033[0m"
17 echo "\033[0;32m"'  ____  / /_     ____ ___  __  __   ____  _____/ /_  '"\033[0m"