Colorized Tool Improvement

Replace color codes with easy to understand names. Improve wording of
some messages.
This commit is contained in:
Andrew Hodges 2011-06-04 08:41:04 -04:00
commit 45b4594189
3 changed files with 46 additions and 28 deletions

View file

@ -1,20 +1,26 @@
echo "Removing ~/.oh-my-zsh"
RESET="\033[0m"
RED="\033[0;31m"
BLUE="\033[0;34m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
UNDERLN="\033[4m"
echo "${RED}Removing ~/.oh-my-zsh${RESET}"
if [[ -d ~/.oh-my-zsh ]]
then
rm -rf ~/.oh-my-zsh
fi
echo "Looking for an existing zsh config..."
echo "${BLUE}Looking for an existing zsh config...${RESET}"
if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]
then
echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
echo "${YELLOW}Found ~/.zshrc.pre-oh-my-zsh.${RESET} ${GREEN}Restoring to ~/.zshrc${RESET}";
rm ~/.zshrc;
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc;
source ~/.zshrc;
else
echo "Switching back to bash"
echo "${BLUE}Switching back to bash${RESET}"
chsh -s /bin/bash
source /etc/profile
fi
echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
echo "${GREEN}Thanks for trying out Oh My Zsh. It has been uninstalled.${RESET}"