91ba6d98875c70d0736fd3eecd0ee4aae52cdc74

Author
Mathieu Comandon <strycore@gmail.com>
Committer
Mathieu Comandon <strycore@gmail.com>
Date

Message

Don't try running chsh if user already runs zsh

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index fc7ad70cf0b4521889d30d7622e6dd1bf8f314ef..fc0a9fa646913dccf83cf80e814c2209f5d4319d 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"