From 502f08b5e19716d43a7ec8b006178a7b017f68cd Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 27 Feb 2015 23:11:00 -0500 Subject: 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 --- tools/uninstall.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tools/uninstall.sh') 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." -- cgit v1.2.3-70-g09d2