2013-05-03 01:52:02 +02:00
|
|
|
#!/usr/bin/env bash
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
set -x # Debug
|
|
|
|
|
2013-05-02 23:59:38 +02:00
|
|
|
DOTFILES=~/.dotfiles
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
[[ ! -d ~/.dotfiles ]] && git clone https://github.com/hcartiaux/dotfiles.git $DOTFILES
|
2014-03-06 01:35:27 +01:00
|
|
|
[[ -d ~/.dotfiles ]] && ( cd $DOTFILES ; git pull )
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
cd ~
|
|
|
|
|
|
|
|
## zsh
|
|
|
|
|
2013-05-03 00:27:15 +02:00
|
|
|
mkdir -p ~/.zsh
|
2014-03-06 01:35:27 +01:00
|
|
|
cd ~/.zsh
|
|
|
|
[[ ! -d ~/.zsh/zsh-syntax-highlighting ]] && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
|
|
|
|
[[ -d ~/.zsh/zsh-syntax-highlighting ]] && (cd ~/.zsh/zsh-syntax-highlighting ; git pull )
|
2013-05-02 23:53:31 +02:00
|
|
|
ln -sf $DOTFILES/zsh/prompt_hyacinthe_setup ~/.zsh/prompt_hyacinthe_setup
|
2014-03-06 01:35:27 +01:00
|
|
|
ln -sf $DOTFILES/zsh/zshrc ~/.zshrc
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
## bash
|
|
|
|
|
2014-02-14 03:07:08 +01:00
|
|
|
ln -sf $DOTFILES/bash/bashrc ~/.bashrc
|
|
|
|
ln -sf $DOTFILES/bash/inputrc ~/.inputrc
|
|
|
|
ln -sf $DOTFILES/bash/bash_profile ~/.bash_profile
|
|
|
|
ln -sf $DOTFILES/bash/profile ~/.profile
|
|
|
|
ln -sf $DOTFILES/bash/bash_logout ~/.bash_logout
|
|
|
|
ln -sf $DOTFILES/bash/bash_environment ~/.bash_environment
|
|
|
|
ln -sf $DOTFILES/bash/bash_oar ~/.bash_oar
|
|
|
|
ln -sf $DOTFILES/bash/bash_aliases ~/.bash_aliases
|
2013-05-02 23:53:31 +02:00
|
|
|
|
2013-05-03 00:22:46 +02:00
|
|
|
if [[ ! -f ~/.git-prompt.sh ]] ; then
|
|
|
|
curl -o ~/.git-prompt.sh \
|
|
|
|
https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh
|
|
|
|
fi
|
|
|
|
|
2013-05-02 23:53:31 +02:00
|
|
|
## vim (don't forget :BundleInstall & :BundleInstall!)
|
|
|
|
|
|
|
|
mkdir -p ~/.vim
|
2014-03-06 01:35:27 +01:00
|
|
|
cd ~/.vim
|
2013-05-03 02:54:00 +02:00
|
|
|
mkdir -p backup undo swap spell bundle
|
2013-05-02 23:53:31 +02:00
|
|
|
[[ ! -d bundle/vundle ]] && git clone https://github.com/gmarik/vundle.git bundle/vundle
|
2014-03-06 01:35:27 +01:00
|
|
|
[[ -d bundle/vundle ]] && ( cd bundle/vundle ; git pull )
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
ln -sf $DOTFILES/vim/vimrc ~/.vimrc
|
2013-05-03 00:43:11 +02:00
|
|
|
[[ ! -h ~/.vim/header ]] && ln -sf $DOTFILES/vim/header ~/.vim/header
|
2013-05-02 23:53:31 +02:00
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
[[ -e ~/.viminfo ]] && mv ~/.viminfo ~/.vim/
|
2013-05-03 02:54:00 +02:00
|
|
|
|
2013-05-02 23:53:31 +02:00
|
|
|
## tmux
|
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
ln -sf $DOTFILES/tmux/tmux.conf ~/.tmux.conf
|
2013-05-02 23:53:31 +02:00
|
|
|
|
|
|
|
## screen
|
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
ln -sf $DOTFILES/screen/screenrc ~/.screenrc
|
2013-05-02 23:53:31 +02:00
|
|
|
|
2014-01-01 17:43:47 +01:00
|
|
|
## rtorrent
|
|
|
|
|
|
|
|
ln -sf $DOTFILES/rtorrent/rtorrent.rc ~/.rtorrent.rc
|
|
|
|
mkdir -p ~/.rtorrent
|
|
|
|
|
2013-05-02 23:53:31 +02:00
|
|
|
## git
|
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
ln -sf $DOTFILES/git/gitconfig ~/.gitconfig
|
2013-05-02 23:53:31 +02:00
|
|
|
|
2014-03-06 01:30:00 +01:00
|
|
|
## wget
|
|
|
|
|
|
|
|
if [[ "`hostname -f | cut -d '.' -f 3`" = "grid5000" ]] ; then
|
|
|
|
ln -sf $DOTFILES/wget/wgetrc.g5k ~/.wgetrc
|
|
|
|
else
|
|
|
|
ln -sf $DOTFILES/wget/wgetrc ~/.wgetrc
|
|
|
|
fi
|
|
|
|
|
2013-05-02 23:53:31 +02:00
|
|
|
## ssh
|
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
mkdir -p ~/.ssh/sockets
|
|
|
|
ln -sf $DOTFILES/ssh/sshpubkey ~/.ssh/sshpubkey
|
|
|
|
cat $DOTFILES/ssh/config.* > ~/.ssh/config.perso
|
|
|
|
[[ ! -f ~/.ssh/config ]] && (
|
|
|
|
cat $DOTFILES/ssh/config{,.*} > ~/.ssh/config
|
|
|
|
)
|
2013-08-21 15:18:56 +02:00
|
|
|
|
2013-08-21 14:54:09 +02:00
|
|
|
## aurvote
|
|
|
|
|
2014-03-06 01:37:29 +01:00
|
|
|
[[ -f /etc/arch-release && ! -f ~/.config/aurvote ]] && (
|
2014-03-06 01:20:06 +01:00
|
|
|
mkdir -p ~/.config
|
|
|
|
cp -f $DOTFILES/aurvote ~/.config/aurvote
|
|
|
|
)
|
2013-08-21 14:54:09 +02:00
|
|
|
|
2014-02-02 11:17:11 +01:00
|
|
|
## RVM configuration
|
|
|
|
|
2014-03-06 01:35:27 +01:00
|
|
|
ln -sf $DOTFILES/rvm/rvmrc ~/.rvmrc
|
2014-02-02 11:17:11 +01:00
|
|
|
|
2013-08-21 14:54:47 +02:00
|
|
|
## temporary files
|
|
|
|
|
|
|
|
ln -sf /tmp ~/.adobe
|
|
|
|
ln -sf /tmp ~/.cache
|
|
|
|
ln -sf /tmp ~/.macromedia
|
|
|
|
ln -sf /tmp ~/.thumbnails
|
2013-05-02 23:53:31 +02:00
|
|
|
|