install.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. if [ -d ~/.oh-my-zsh ]
  2. then
  3. echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install"
  4. exit
  5. fi
  6. echo "\033[0;34mCloning Oh My Zsh...\033[0m"
  7. /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
  8. echo "\033[0;34mLooking for an existing zsh config...\033[0m"
  9. if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
  10. then
  11. echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m";
  12. cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
  13. rm ~/.zshrc;
  14. fi
  15. echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
  16. cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
  17. echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
  18. echo "export PATH=$PATH" >> ~/.zshrc
  19. echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
  20. chsh -s `which zsh`
  21. echo "\033[0;32m"' __ __ '"\033[0m"
  22. echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m"
  23. echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m"
  24. echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m"
  25. echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
  26. echo "\033[0;32m"' /____/ '"\033[0m"
  27. echo "\n\n \033[0;32m....is now installed.\033[0m"
  28. /usr/bin/env zsh
  29. source ~/.zshrc