forked from jigish/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·47 lines (41 loc) · 1.31 KB
/
bootstrap
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
#!/bin/bash
CURRDIR=`pwd`
SCRIPTDIR=$(cd `dirname $0` && pwd)
# Update git submodules
cd $SCRIPTDIR
git pull
git submodule update --init
cd vim-config
git submodule update --init
# Create Links
cd ~
[[ ! -L .bashrc ]] && [[ -f .bashrc ]] && mv .bashrc .bashrc.old
[[ ! -L .bashrc ]] && ln -s $SCRIPTDIR/bashrc .bashrc
[[ ! -L .bashrc.`uname` ]] && ln -s $SCRIPTDIR/bashrc.`uname` .bashrc.`uname`
[[ ! -L .gitconfig ]] && ln -s $SCRIPTDIR/gitconfig .gitconfig
[[ ! -L .git-global-ignore ]] && ln -s $SCRIPTDIR/git-global-ignore .git-global-ignore
[[ ! -L .tigrc ]] && ln -s $SCRIPTDIR/tigrc .tigrc
[[ ! -L .vim ]] && ln -s $SCRIPTDIR/vim-config .vim
[[ ! -L .vimrc ]] && ln -s .vim/vimrc .vimrc
[[ ! -L .screenrc ]] && ln -s $SCRIPTDIR/screenrc .screenrc
[[ ! -L .zshrc ]] && ln -s $SCRIPTDIR/zshrc .zshrc
[[ ! -L .irssi ]] && ln -s $SCRIPTDIR/irssi .irssi
mkdir -p .config
cd .config
[[ ! -L nvim ]] && ln -s $SCRIPTDIR/nvim nvim
cd ~
mkdir -p bin
cd bin
[[ ! -L z.sh ]] && ln -s $SCRIPTDIR/z/z.sh
[[ ! -L e ]] && ln -s $SCRIPTDIR/bin/e
# run os-specific shit
$SCRIPTDIR/bootstrap.`uname`
# run company-specific shit
if [ "$1" = "netflix" ]; then
cd ~
[[ ! -d dotfiles-netflix ]] && git clone ssh://[email protected]:7999/~jigishp/dotfiles.git dotfiles-netflix
cd dotfiles-netflix
git pull
./bootstrap
fi
cd $CURRDIR