-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·53 lines (41 loc) · 1.12 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
linkit() {
tgt=~/$2
src=$1
if [ ! -e $src ] ; then
echo "I can't find $src, check your code"
exit 1
fi
if [ -e $tgt -a ! -h $tgt ] ; then
echo "$src looks like it is already setup... you should delete it first or move it so I don't break things"
exit 1
fi
if [ -e $tgt -a -h $tgt ] ; then
echo "Removing old symbolic link for $src"
rm $tgt
fi
echo "Adding link for $src"
ln -s `pwd`/$src $tgt
}
linkit ./ .mydotfiles
linkit zshrc .zshrc
linkit bashrc .bashrc
linkit bash_profile .bash_profile
linkit vimrc .vimrc
linkit vim .vim
linkit tmux.conf .tmux.conf
linkit gitconfig .gitconfig
linkit gitignore_global .gitignore_global
linkit osx/slate/slate_local.js .slate_local.js
mkdir -p ~/bin
# Link everything from bin to ~/bin
for f in `ls bin/* | grep -v "~"` ; do
linkit $f $f
done
# A little extra vim setup
if [ ! -e vim/bundle/Vundle.vim ] ; then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
echo "Hit enter to install vundle bundles, ctrl-c to skip"
read a
vim +BundleInstall +qall