diff options
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." |