]> git.friedersdorff.com Git - max/dotfiles.git/blob - makelinks.sh
Use solarized theme for vim airline
[max/dotfiles.git] / makelinks.sh
1 #!/bin/bash
2 ############################
3 # .make.sh
4 # Create symlinks from the home directory to dotfiles in ~/etc/dotfiles
5 ############################
6
7 ########## Variables
8
9 dir=~/etc/dotfiles                    
10 olddir=~/etc/dotfiles.bak             
11 files="vimrc bashrc bash_profile bash_aliases dir_colors Xresources gitconfig gitignore xinitrc inputrc"
12 directories="mutt"
13
14 ##########
15
16 # create dotfiles_old in homedir
17 mkdir -p $olddir
18
19 # change to the dotfiles directory
20 cd $dir
21
22 # move any existing dotfiles in homedir to dotfiles_old directory, 
23 #then create symlinks from the homedir to any files in the 
24 #~/dotfiles directory specified in $files
25 for file in $files; do
26   mv ~/.$file $olddir/
27   ln -s $dir/$file ~/.$file
28 done
29
30 # For every directory execute the install file.
31 for directory in $directories; do
32   mkdir -p ~/.$directory
33   source ./$directory/makelinks.sh
34 done
35
36