summaryrefslogtreecommitdiff
path: root/tools/uninstall.sh
diff options
context:
space:
mode:
authorAndrew Janke <janke@pobox.com>2015-02-27 23:11:00 -0500
committerAndrew Janke <andrew@apjanke.net>2015-09-03 12:47:02 -0400
commit502f08b5e19716d43a7ec8b006178a7b017f68cd (patch)
treec9f6bf93a93609c1b47370f9b980ffeb35e3f870 /tools/uninstall.sh
parent3ea33841863c4f5f22a27e64ae7950d901b674af (diff)
downloadzsh-502f08b5e19716d43a7ec8b006178a7b017f68cd.tar.gz
zsh-502f08b5e19716d43a7ec8b006178a7b017f68cd.tar.bz2
zsh-502f08b5e19716d43a7ec8b006178a7b017f68cd.zip
Add Cygwin support to installer.
* Balk at incompatible Windows/MSYS git * Test for chsh presence before trying to use it * Replace non-portable `[[ ... ]]` and `[ x = *pattern* ]` constructs
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."