0c41b1cdc3ff7b00ffb2310b91becb91b31704f7

Author
Andrew Hodges <betawaffle@gmail.com>
Committer
Andrew Hodges <betawaffle@gmail.com>
Date

Message

Colorize Install & Upgrade Scripts

Make tools/install.sh and tools/upgrade.sh pretty.

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index 8ed1403af12109c0dd23051e41c4acf353501fcf..aedb706dae1c96a71b8ec31fb2f038cc3e7a9fa3 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -1,36 +1,36 @@
 6 if [ -d ~/.oh-my-zsh ]
 7 then
 8-  echo "You already have Oh My Zsh installed. You'll need to remove ~/.oh-my-zsh if you want to install"
 9+  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"
10   exit
11 fi
12 
13-echo "Cloning Oh My Zsh..."
14+echo "\033[0;34mCloning Oh My Zsh...\033[0m"
15 /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
16 
17-echo "Looking for an existing zsh config..."
18+echo "\033[0;34mLooking for an existing zsh config...\033[0m"
19 if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
20 then
21-  echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
22+  echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m";
23   cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
24   rm ~/.zshrc;
25 fi
26 
27-echo "Using the Oh My Zsh template file and adding it to ~/.zshrc"
28+echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
29 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
30 
31-echo "Copying your current PATH and adding it to the end of ~/.zshrc for you."
32+echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
33 echo "export PATH=$PATH" >> ~/.zshrc
34 
35-echo "Time to change your default shell to zsh!"
36+echo "\033[0;34mTime to change your default shell to zsh!\033[0m"
37 chsh -s `which zsh`
38 
39-echo '         __                                     __  '
40-echo '  ____  / /_     ____ ___  __  __   ____  _____/ /_ '
41-echo ' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '
42-echo '/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '
43-echo '\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '
44-echo '                        /____/'
45+echo "\033[0;32m"'         __                                     __   '"\033[0m"
46+echo "\033[0;32m"'  ____  / /_     ____ ___  __  __   ____  _____/ /_  '"\033[0m"
47+echo "\033[0;32m"' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '"\033[0m"
48+echo "\033[0;32m"'/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '"\033[0m"
49+echo "\033[0;32m"'\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '"\033[0m"
50+echo "\033[0;32m"'                        /____/                       '"\033[0m"
51 
52-echo "\n\n ....is now installed."
53+echo "\n\n \033[0;32m....is now installed.\033[0m"
54 /usr/bin/env zsh
55 source ~/.zshrc
56diff --git a/tools/upgrade.sh b/tools/upgrade.sh
57index 6bdd02e3865d0f66c01f2d911ca5749824465ee2..7e5cc7655d21cc887fd8fd06fb9956dc5e4bd47c 100644
58--- a/tools/upgrade.sh
59+++ b/tools/upgrade.sh
60@@ -1,12 +1,13 @@
61 current_path=`pwd`
62-echo "Upgrading Oh My Zsh"
63+echo "\033[0;34mUpgrading Oh My Zsh\033[0m"
64 ( cd $ZSH && git pull origin master )
65-echo '         __                                     __  '
66-echo '  ____  / /_     ____ ___  __  __   ____  _____/ /_ '
67-echo ' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '
68-echo '/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '
69-echo '\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '
70-echo '                        /____/'
71-echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session."
72-echo "To keep up on the latest, be sure to follow Oh My Zsh on twitter: http://twitter.com/ohmyzsh"
73-cd $current_path
74+echo "\033[0;32m"'         __                                     __   '"\033[0m"
75+echo "\033[0;32m"'  ____  / /_     ____ ___  __  __   ____  _____/ /_  '"\033[0m"
76+echo "\033[0;32m"' / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ '"\033[0m"
77+echo "\033[0;32m"'/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / '"\033[0m"
78+echo "\033[0;32m"'\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  '"\033[0m"
79+echo "\033[0;32m"'                        /____/                       '"\033[0m"
80+echo "\033[0;34mHooray! Oh My Zsh has been updated and/or is at the current version.\033[0m"
81+echo "\033[0;34mAny new updates will be reflected when you start your next terminal session.\033[0m"
82+echo "\033[0;34mTo keep up on the latest, be sure to follow Oh My Zsh on twitter: \033[1mhttp://twitter.com/ohmyzsh\033[0m"
83+cd $current_path