diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-09-28 08:52:03 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-28 08:52:03 -0400 |
commit | e4fdb083655fc582ebcecb07cd1bd1130077f0e4 (patch) | |
tree | fee07d9adfee79d1c88206ead154a23520ac51cb /tools/uninstall.sh | |
parent | 5c8b0cc0c1782b34790548498018fb9e0300992b (diff) | |
parent | b05ef1034fffd7b0c29f1558a8a357ccce7ae74b (diff) | |
download | zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.tar.gz zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.tar.bz2 zsh-e4fdb083655fc582ebcecb07cd1bd1130077f0e4.zip |
Merge branch 'master' into copyfile-portability
Diffstat (limited to 'tools/uninstall.sh')
-rw-r--r-- | tools/uninstall.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/uninstall.sh b/tools/uninstall.sh index 41d601576..23bfac0eb 100644 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -1,5 +1,5 @@ echo "Removing ~/.oh-my-zsh" -if [[ -d ~/.oh-my-zsh ]] +if [ -d ~/.oh-my-zsh ] then rm -rf ~/.oh-my-zsh fi @@ -20,9 +20,13 @@ then source ~/.zshrc; else - echo "Switching back to bash" - chsh -s /bin/bash - source /etc/profile + if hash chsh >/dev/null 2>&1 + then + echo "Switching back to bash" + chsh -s /bin/bash + else + echo "You can edit /etc/passwd to switch your default shell back to bash" + fi fi echo "Thanks for trying out Oh My Zsh. It's been uninstalled." |