install.sh 1.2 KB

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