summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-08-17 20:59:39 -0400
committerAndrew Janke <andrew@apjanke.net>2015-08-17 20:59:39 -0400
commit00eb4658304b010afdfa87f74be673c8aced4961 (patch)
tree3d9e7f95f21265c3c60f10cdca720308bb2421c6 /tools
parent47d19cc56425aa7c550d845726111ee8bd9520d1 (diff)
parent192de6bcffb0294e19f4203f6f7dc1a7f3e427be (diff)
downloadzsh-00eb4658304b010afdfa87f74be673c8aced4961.tar.gz
zsh-00eb4658304b010afdfa87f74be673c8aced4961.tar.bz2
zsh-00eb4658304b010afdfa87f74be673c8aced4961.zip
Merge branch 'master' into fold-terminalapp-plugin-into-termsupport
Diffstat (limited to 'tools')
-rw-r--r--tools/check_for_upgrade.sh5
-rwxr-xr-xtools/install.sh6
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index b2b356e0c..5afd83c1e 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -41,10 +41,9 @@ then
then
_upgrade_zsh
else
- echo "[Oh My Zsh] Would you like to check for updates?"
- echo "Type Y to update oh-my-zsh: \c"
+ echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"
read line
- if [ "$line" = Y ] || [ "$line" = y ]; then
+ if [ "$line" = Y ] || [ "$line" = y ] || [ -z "$line" ]; then
_upgrade_zsh
else
_update_zsh_update
diff --git a/tools/install.sh b/tools/install.sh
index bd4c55749..c83a6f23d 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -32,10 +32,12 @@ sed -i -e "/export PATH=/ c\\
export PATH=\"$PATH\"
" ~/.zshrc
-if [ "$SHELL" != "$(which zsh)" ]; then
+TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)')
+if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then
echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
- chsh -s `which zsh`
+ chsh -s $(grep /zsh$ /etc/shells | tail -1)
fi
+unset TEST_CURRENT_SHELL
echo "\033[0;32m"' __ __ '"\033[0m"
echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"