浏览代码

Merge pull request #3049 from strycore/master

Prevent chsh from running when $SHELL is already zsh
Robby Russell 10 年之前
父节点
当前提交
c1cd9cb126
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      tools/install.sh

+ 4 - 2
tools/install.sh

@@ -32,8 +32,10 @@ sed -i -e "/export PATH=/ c\\
 export PATH=\"$PATH\"
 " ~/.zshrc
 
-echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
-chsh -s `which zsh`
+if [ "$SHELL" != "$(which zsh)" ]; then
+    echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
+    chsh -s `which zsh`
+fi
 
 echo "\033[0;32m"'         __                                     __   '"\033[0m"
 echo "\033[0;32m"'  ____  / /_     ____ ___  __  __   ____  _____/ /_  '"\033[0m"