uninstall.sh 481 B

1234567891011121314151617181920
  1. echo "Removing ~/.oh-my-zsh"
  2. if [[ -d ~/.oh-my-zsh ]]
  3. then
  4. rm -rf ~/.oh-my-zsh
  5. fi
  6. echo "Looking for an existing zsh config..."
  7. if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]
  8. then
  9. echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
  10. rm ~/.zshrc;
  11. cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc;
  12. source ~/.zshrc;
  13. else
  14. echo "Switching back to bash"
  15. chsh -s /bin/bash
  16. source /etc/profile
  17. fi
  18. echo "Thanks for trying out Oh My Zsh. It's been uninstalled."