2013-03-22 18:06:04 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source ~/.dotfiles/zsh/functions
|
2013-03-16 21:16:00 -07:00
|
|
|
|
|
|
|
if [ ! -d ~/.oh-my-zsh ]; then
|
2013-03-25 17:31:23 -07:00
|
|
|
if is_linux; then
|
|
|
|
# Try to install zsh
|
|
|
|
pkg-install zsh
|
|
|
|
fi
|
|
|
|
|
2013-03-16 21:16:00 -07:00
|
|
|
# https://github.com/robbyrussell/oh-my-zsh
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> ZSH: Installing oh-my-zsh"
|
2013-03-16 21:16:00 -07:00
|
|
|
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
|
|
|
|
|
|
|
|
# Set new shell
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> ZSH: Changing shell"
|
2013-03-26 01:33:59 -07:00
|
|
|
chsh -s $(which zsh)
|
2013-03-22 18:07:17 -07:00
|
|
|
else
|
|
|
|
echo-g "==> ZSH: Updating"
|
|
|
|
cd ~/.oh-my-zsh
|
|
|
|
git pull
|
2013-03-16 21:16:00 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Create links
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> ZSH: Setting up symlinks"
|
|
|
|
do_link ~/.dotfiles/zsh ~/.zsh
|
|
|
|
do_link ~/.dotfiles/zshrc ~/.zshrc
|
|
|
|
do_link ~/.dotfiles/zshenv ~/.zshenv
|
|
|
|
do_link ~/.dotfiles/bashrc ~/.bashrc
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> ZSH: DONE!"
|