-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbootstrap.sh
executable file
·41 lines (34 loc) · 1.02 KB
/
bootstrap.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
#!/bin/bash
dir=$(dirname $0)
dotdir=$($dir/bin/realpath $dir)
for file in $dotdir/*; do
filename=$(basename $file)
dotfile=$HOME/.$filename
if [ $filename = $(basename $0) -o $filename = "README.md" ]; then continue ; fi
if [ -e $dotfile ]; then
if [ -L $dotfile ]; then
printf "$dotfile is already a link!\n"
else
printf "$dotfile already exists. Remove it!\n"
fi
else
printf "Linking $dotfile to $file\n"
ln -s $file $dotfile
fi
done
# set up zsh shell environment
if [ -d $HOME/.oh-my-zsh ]; then
printf "OH-MY-ZSH is already installed, only updating ...\n"
zsh $HOME/.oh-my-zsh/tools/upgrade.sh
else
printf "Installing OH-MY-ZSH\n"
git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh
fi
# Install vim bundles
if [ -d $HOME/.vim/bundle/vundle ]; then
printf "Updading vundle ...\n"
cd $HOME/.vim/bundle/vundle; git pull; cd -
else
git clone http://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle
fi
vim -u ~/.vim/bundles.vim +BundleInstall +q +q