浏览代码

Make the chsh more reliable.

Arthur Kalmenson 14 年之前
父节点
当前提交
1e2152fcf3
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      tools/install.sh

+ 6 - 1
tools/install.sh

@@ -22,7 +22,12 @@ echo "Copying your current PATH and adding it to the end of ~/.zshrc for you."
 echo "export PATH=$PATH" >> ~/.zshrc
 
 echo "Time to change your default shell to zsh!"
-chsh -s "/usr/bin/env zsh"
+if [ -f /bin/zsh ]
+then
+  chsh -s /bin/zsh
+else
+  chsh -s "/usr/bin/env zsh"
+fi
 
 echo '         __                                     __  '
 echo '  ____  / /_     ____ ___  __  __   ____  _____/ /_ '