-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·56 lines (49 loc) · 1.08 KB
/
install.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
52
53
54
55
56
#!/usr/bin/env bash
print_help() {
cat <<-EOS
$0: install dotfiles to your home directory
OPTION:
-h, --help: print help
-i, --init: initial install (install VundleVim and Plugins)
EOS
}
while getopts hi-: OPT
do
case $OPT in
h)
print_help
exit
;;
i)
INIT_FLAG=1
;;
-)
case $OPTARG in
help)
print_help
exit
;;
init)
INIT_FLAG=1
;;
esac
;;
esac
done
shift $(($OPTIND - 1))
[[ -v INIT_FLAG ]] && {
mkdir -p "$HOME/.vim/colors"
wget -P "$HOME/.vim/colors/" https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim
mkdir -p "$HOME/.vim/bundle/"
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
git config --global user.name "Ryoto Saito"
git config --global user.email [email protected]
}
REPODIR="$(cd $(dirname $0); pwd)"
cd $REPODIR
echo "DOTFILES=\"$REPODIR\"" > .dotfiles_path
for file in .bash_logout .bash_profile .bashrc .dotfiles_path .inputrc .profile .rc .screenrc .tmux.conf .vimrc
do
ln -is "$REPODIR/$file" "$HOME/$file"
done