This commit is contained in:
Andrew Vit 2013-10-25 15:13:11 -07:00
commit 66d87c35cc
2 changed files with 23 additions and 10 deletions

View file

@ -20,8 +20,14 @@ h4. via `wget`
@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh@
h3. The manual way
h4. Install location
You can change the install destination via the ZSH environment variable. The default location is `~/.oh-my-zsh`:
@...install.sh | ZSH=~/.dotfiles sh@
h3. The manual way
1. Clone the repository

View file

@ -1,14 +1,18 @@
if [ -d ~/.oh-my-zsh ]
set -e
if [ ! -n $ZSH ]
then
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"
exit
ZSH=~/.oh-my-zsh
fi
echo "\033[0;34mCloning Oh My Zsh...\033[0m"
hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || {
echo "git not installed"
exit
}
if [ ! -d $ZSH ]
then
echo "\033[0;34mCloning Oh My Zsh...\033[0m"
hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
echo "git not installed"
exit
}
fi
echo "\033[0;34mLooking for an existing zsh config...\033[0m"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
@ -18,7 +22,10 @@ then
fi
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
sed -i -e "/^ZSH=/ c\\
ZSH=$ZSH
" ~/.zshrc
echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
echo "export PATH=\$PATH:$PATH" >> ~/.zshrc