diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index e1e4eb99f..1a6ddf2c3 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -19,12 +19,15 @@ then epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) if [ $epoch_diff -gt 6 ] then + if [ -z "$ZSH" ] + ZSH=$HOME/.oh-my-zsh + echo $SHELL echo "[Oh My Zsh] Would you like to check for updates?" echo "Type Y to update oh-my-zsh: \c" read line if [ "$line" = Y ] || [ "$line" = y ] then - /bin/sh $ZSH/tools/upgrade.sh + $SHELL "$ZSH/tools/upgrade.sh" # update the zsh file _update_zsh_update fi