diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/uninstall.sh | 10 | ||||
-rw-r--r-- | tools/upgrade.sh | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/tools/uninstall.sh b/tools/uninstall.sh index da31a6a14..b327a0163 100644 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -25,18 +25,14 @@ if [ -e "$ZSHRC_ORIG" ]; then echo "Your original zsh config was restored." fi -if hash chsh >/dev/null 2>&1; then - if [ -f ~/.shell.pre-oh-my-zsh ]; then - old_shell=$(cat ~/.shell.pre-oh-my-zsh) - else - old_shell=/bin/bash - fi +if hash chsh >/dev/null 2>&1 && [ -f ~/.shell.pre-oh-my-zsh ]; then + old_shell=$(cat ~/.shell.pre-oh-my-zsh) echo "Switching your shell back to '$old_shell':" if chsh -s "$old_shell"; then rm -f ~/.shell.pre-oh-my-zsh else echo "Could not change default shell. Change it manually by running chsh" - echo "or editing the /etc/passwd file." + echo "or editing the /etc/passwd file." fi fi diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 55768cd6e..3005e6542 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -33,7 +33,7 @@ git config receive.fsck.zeroPaddedFilemode ignore # Update upstream remote to ohmyzsh org remote=$(git remote -v | awk '/https:\/\/github\.com\/robbyrussell\/oh-my-zsh\.git/{ print $1; exit }') -if [[ -n "$remote" ]]; then +if [ -n "$remote" ]; then git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git" fi |