-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·59 lines (46 loc) · 983 Bytes
/
install
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
52
53
54
55
56
57
58
#!/bin/bash
set -e
DOTFILES_ROOT="$HOME/dotfiles"
VUNDLE="$DOTFILES_ROOT/.vim/bundle/vundle"
cd "$HOME"
info () {
printf "\r [\033[00;34mINFO\033[0m ] $1\n"
}
success () {
printf "\r\033[2K [\033[00;32mOK\033[0m ] $1\n"
}
fail () {
printf "\r\033[2K [\033[0;31mFAIL\033[0m] $1\n"
echo ''
exit 1
}
ln_s () {
ln -sfn "$DOTFILES_ROOT/$1" "$2"
}
info "Configuring Git"
ln_s .gitconfig .
ln_s .gitignore .
ln_s .git-completion .
success "Git Done"
info "Configuring rc"
ln_s .eslintrc.json .
success "rc done."
info "Configuring Vim"
ln_s .vimrc .
ln_s .vim .
if [ ! -d "$VUNDLE" ]; then
git clone https://github.com/gmarik/vundle.git "$DOTFILES_ROOT/.vim/bundle/vundle"
fi
success "Vim Done"
info "Configuring Bash"
ln_s .aliases .
ln_s .bash_profile .
ln_s .bash_prompt .
ln_s .commonrc .
ln_s .functions .
success "Bash Done"
info "Install diff-so-fancy"
npm install -g diff-so-fancy
success "diff-so-fancy Done"
info "Reloading the shell"
exec $SHELL -l