dotfiles/install.sh

44 lines
1.3 KiB
Bash
Raw Normal View History

2012-11-21 16:25:02 +01:00
#!/bin/sh
# cleaning
2013-08-19 11:42:09 +02:00
rm -rf ~/.dotfiles ~/.oh-my-zsh ~/.zshrc ~/.vim ~/.vimrc ~/.gvimrc ~/.gitignore ~/.tmux.conf
2012-11-21 16:25:02 +01:00
2013-08-19 13:53:20 +02:00
# repos
2012-11-21 16:25:02 +01:00
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
2013-08-19 13:53:20 +02:00
if [ `hostname` = "tuonela" ] && [ `whoami` = "bartek.stalewski" ]; then
path="git@bitbucket.org:ftpd/dotfiles.git"
else
path="https://bitbucket.org/ftpd/dotfiles.git"
fi
git clone $path ~/.dotfiles
cd ~/.dotfiles
git submodule init
git submodule update
cd vim/bundle/powerline
git checkout -b develop origin/develop
# files
## zsh
2012-11-21 16:25:02 +01:00
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
sed -i -e 's/robbyrussell/nicoulaj/' ~/.zshrc
2013-01-07 23:44:02 +01:00
sed -i -e 's/# CASE_SENSITIVE/CASE_SENSITIVE/' ~/.zshrc
2013-08-19 13:16:21 +02:00
case `uname` in
2013-08-19 13:53:20 +02:00
Linux) echo 'eval $( dircolors -b ~/.dotfiles/dircolors/dircolors.ansi-universal ) ' >> ~/.zshrc ;;
Darwin) echo 'eval $( gdircolors -b ~/.dotfiles/dircolors/dircolors.ansi-universal ) ' >> ~/.zshrc ;;
2013-08-19 13:14:28 +02:00
esac
2012-11-23 15:35:01 +01:00
echo "zstyle ':vcs_info:*' enable hg bzr git svn" >> ~/.zshrc
2013-08-19 12:57:01 +02:00
echo "[ -e ~/.zshrc.local ] && source ~/.zshrc.local" >> ~/.zshrc
2012-11-21 16:25:02 +01:00
# vim
2012-11-21 18:05:14 +01:00
ln -sf ~/.dotfiles/vim ~/.vim
ln -sf ~/.vim/rcfiles/vimrc ~/.vimrc
ln -sf ~/.vim/rcfiles/gvimrc ~/.gvimrc
2012-11-21 16:25:02 +01:00
rm -rf ~/.vim/bundle/*
# .gitignore
2012-11-21 18:05:14 +01:00
ln -sf ~/.dotfiles/gitignore ~/.gitignore
2013-08-19 11:42:09 +02:00
# tmux
ln -sf ~/.dotfiles/tmux.conf ~/.tmux.conf