summaryrefslogtreecommitdiff
path: root/tools/uninstall.sh
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-09-26 09:35:39 -0700
committerRobby Russell <robby@planetargon.com>2015-09-26 09:35:39 -0700
commit935948cf3b701ced12ebc249981258eb07d6b052 (patch)
tree00555ad02961514705565bb0e5c693c0d66bde92 /tools/uninstall.sh
parentb5a5bc9ae58bdd8191c20dd1f72d423a000149fc (diff)
parent96ff86142e9037e707f9cde8ab69e0425a0559c6 (diff)
downloadzsh-935948cf3b701ced12ebc249981258eb07d6b052.tar.gz
zsh-935948cf3b701ced12ebc249981258eb07d6b052.tar.bz2
zsh-935948cf3b701ced12ebc249981258eb07d6b052.zip
Merge pull request #3646 from apjanke/installer-cygwin-support-3
Add Cygwin support to installer.
Diffstat (limited to 'tools/uninstall.sh')
-rw-r--r--tools/uninstall.sh12
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."