dotfiles/install.sh

123 lines
2.5 KiB
Bash
Raw Normal View History

2013-06-01 23:07:50 +00:00
#!/bin/bash
2013-08-22 14:26:45 +00:00
function deploy_for_desktop()
{ # {{{
cd ~
ln -s $WAI/xinitrc ./.xinitrc
2013-11-11 20:48:13 +00:00
ln -s $WAI/inputrc ./.inputrc
2013-08-22 19:28:44 +00:00
ln -s $WAI/Xmodmap ./.Xmodmap
2013-08-22 14:26:45 +00:00
ln -s $WAI/octaverc ./.octaverc
ln -s $WAI/gitconfig ./.gitconfig
cd ~
if [ ! -d "~/.my_utils" ]; then mkdir ~/.my_utils; fi;
cd ~/.my_utils
ln -s $WAI/Utils/track.sh ./track.sh
ln -s $WAI/Utils/blink.sh ./blink.sh
ln -s $WAI/Utils/octopus.sh ./octopus.sh
ln -s $WAI/chooseWP.sh ~/Pictures/wallpapers/chooseWP.sh
} # }}}
function deploy_vim()
{ # {{{
cd ~
ln -s $WAI/vim/vimrc ./.vimrc
if [ ! -d "~/.vim" ]; then mkdir ~/.vim/; fi;
cd ~/.vim
if [ ! -d "./colors" ]; then mkdir colors; fi;
cd colors
ln -s $WAI/vim/colors/wombat256modv1.vim ./wombat256modv1.vim
cd ..
if [ ! -d "./skeletons" ]; then mkdir skeletons; fi;
cd skeletons
for i in `ls $WAI/vim/skeletons`; do ln -s $WAI/vim/skeletons/$i ./$i; done
cd ..
if [ ! -d "./spell" ]; then mkdir spell; fi;
cd spell
for i in `ls $WAI/vim/spell`; do ln -s $WAI/vim/spell/$i ./$i; done
cd ..
if [ ! -d "./plugin" ]; then mkdir plugin; fi;
cd plugin
for i in `ls $WAI/vim/plugin`; do ln -s $WAI/vim/plugin/$i ./$i; done
cd ..
if [ ! -d "./scripts" ]; then mkdir scripts; fi;
cd scripts
for i in `ls $WAI/vim/scripts`; do ln -s $WAI/vim/scripts/$i ./$i; done
2013-10-06 17:55:14 +00:00
cd ..
if [ ! -d "./ftplugin" ]; then mkdir ftplugin; fi;
cd ftplugin
for i in `ls $WAI/vim/ftplugin`; do ln -s $WAI/vim/ftplugin/$i ./$i; done
2013-08-22 14:26:45 +00:00
} # }}}
function deploy_ssh()
{ # {{{
if [ ! -d "~/.ssh" ]; then mkdir .ssh/; fi;
cd ~/.ssh
ln -s $WAI/ssh/config ./
} # }}}
function deploy_mutt()
{ # {{{
cd ~
ln -s $WAI/mailcap ./.mailcap
2013-06-01 23:14:47 +00:00
2013-08-22 14:26:45 +00:00
if [ ! -d "~/.mutt" ]; then mkdir ~/.mutt/; fi;
cd ~/.mutt
ln -s $WAI/mutt/muttrc ./
ln -s $WAI/mutt/killsig ./
ln -s $WAI/mutt/passwords.gpg ./
ln -s $WAI/mutt/crypto ./
ln -s $WAI/mutt/colors.test1 ./
ln -s $WAI/mutt/colors.test2 ./
ln -s $WAI/mutt/unlock-pass.sh ./
2013-10-06 17:55:14 +00:00
ln -s $WAI/mutt/account.frank ./
ln -s $WAI/mutt/account.aei ./
2013-08-22 14:26:45 +00:00
} # }}}
WAI=`pwd`
2013-06-02 19:31:03 +00:00
#simple files
2013-08-22 14:26:45 +00:00
cd ~
2013-11-26 20:13:30 +00:00
ln -s ~/Programmation/dotfiles/Utils/ .my_utils
2013-06-01 23:14:47 +00:00
ln -s $WAI/bashrc ./.bashrc
2013-09-11 14:43:52 +00:00
ln -s $WAI/bash_ps1 ./.bash_ps1
2013-08-22 14:26:45 +00:00
deploy_for_desktop
deploy_vim
deploy_ssh
deploy_mutt
2013-08-04 15:50:26 +00:00
2013-06-11 22:42:55 +00:00
cd ~
if [ -d "Programmation" ]; then mkdir Programmation; fi;
2013-06-04 16:43:31 +00:00
cd ~/Programmation
2013-07-03 23:48:39 +00:00
ln -s $WAI/git_auto_pull.sh ./git_auto_pull.sh
2013-08-22 14:26:45 +00:00
function deploy_directory()
{ # {{{
# @arg1: dst directory
# @arg2: src directory
if [ ! -d $1 ]; then mkdir $1; fi;
cd $1;
for i in `ls $2`; do ln -s $2/$i ./$i; done
cd ..
} # }}}