2012-11-21 16:25:02 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# cleaning
|
2016-06-14 13:49:11 +02:00
|
|
|
rm -rf ~/.dotfiles ~/.zsh ~/.oh-my-zsh ~/.zshrc ~/.vim ~/.vimrc ~/.config/nvim ~/.config/vim-plugins ~/.gitignore ~/.tmux.conf
|
2012-11-21 16:25:02 +01:00
|
|
|
|
2013-08-19 13:53:20 +02:00
|
|
|
# repos
|
2016-06-14 13:31:47 +02:00
|
|
|
if [ `whoami` = "f" ]; then
|
2013-08-19 13:53:20 +02:00
|
|
|
path="git@bitbucket.org:ftpd/dotfiles.git"
|
|
|
|
else
|
|
|
|
path="https://bitbucket.org/ftpd/dotfiles.git"
|
|
|
|
fi
|
|
|
|
git clone $path ~/.dotfiles
|
|
|
|
|
2016-06-10 10:53:53 +02:00
|
|
|
# zsh
|
2016-06-10 10:51:52 +02:00
|
|
|
mkdir ~/.zsh
|
|
|
|
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
|
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.zsh/autosuggestions
|
2012-11-21 16:25:02 +01:00
|
|
|
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
|
2016-06-03 14:15:22 +02:00
|
|
|
sed -i -e 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/' ~/.zshrc
|
2013-01-07 23:44:02 +01:00
|
|
|
sed -i -e 's/# CASE_SENSITIVE/CASE_SENSITIVE/' ~/.zshrc
|
2016-06-14 19:41:21 +02:00
|
|
|
if [ ! `whoami` = "root" ]; then
|
|
|
|
echo 'export DEFAULT_USER=$LOGNAME' >> ~/.zshrc
|
|
|
|
fi
|
2016-06-14 19:28:33 +02:00
|
|
|
echo "zstyle ':vcs_info:*' enable git svn" >> ~/.zshrc
|
2016-06-10 10:51:52 +02:00
|
|
|
echo "[ -e ~/.zsh/autosuggestions/zsh-autosuggestions.zsh ] && source ~/.zsh/autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
|
2013-08-19 12:57:01 +02:00
|
|
|
echo "[ -e ~/.zshrc.local ] && source ~/.zshrc.local" >> ~/.zshrc
|
2016-06-03 14:22:30 +02:00
|
|
|
touch ~/.zshrc.local
|
2013-10-23 02:56:54 +02:00
|
|
|
source ~/.zshrc
|
2012-11-21 16:25:02 +01:00
|
|
|
|
|
|
|
# vim
|
2016-06-14 13:31:47 +02:00
|
|
|
mkdir -p ~/.config
|
|
|
|
ln -sf ~/.dotfiles/vim ~/.vim
|
|
|
|
ln -sf ~/.dotfiles/vim ~/.config/nvim
|
|
|
|
ln -sf ~/.dotfiles/vim/init.vim ~/.vimrc
|
2012-11-21 16:25:02 +01:00
|
|
|
|
|
|
|
# .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
|