diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-12-04 18:47:31 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-12-04 18:47:31 -0700 |
commit | 9ea85c9348827954d7886306268b54614eb0b03c (patch) | |
tree | 067666d643f2957cced426ffbbce485d08b383fd /tools/uninstall.sh | |
parent | 9c851a9b820a70b8d23dee0b51220d009e749cec (diff) | |
parent | 903a3e9daa110944a9edc37a5952b4a9ff630b39 (diff) | |
download | zsh-9ea85c9348827954d7886306268b54614eb0b03c.tar.gz zsh-9ea85c9348827954d7886306268b54614eb0b03c.tar.bz2 zsh-9ea85c9348827954d7886306268b54614eb0b03c.zip |
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'tools/uninstall.sh')
-rw-r--r-- | tools/uninstall.sh | 10 |
1 files changed, 3 insertions, 7 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 |