summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
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"