-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
50 lines (41 loc) · 1.01 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
# https://github.com/tungel/mylinux
# TODO:
# - convert to Ruby
# - handle when `dotfiles` and `~/.vim` already exist
BASEDIR=$(pwd)
if [ $# -gt 0 ]; then
option=$1
case $option in
--ssh)
echo "use ssh"
git clone [email protected]:everbot/dotfiles.git
git clone [email protected]:everbot/.vim.git
shift
;;
*)
echo "Option doesn't exist! Bye!"
exit 1
;;
esac
else
echo "use http"
git clone https://github.com/tungel/dotfiles.git
git clone https://github.com/tungel/.vim.git
fi
cd dotfiles
./install.rb overwrite
# TODO: ask user before removing and symlink this
cd ..
rm -rf ~/.vim
rm ~/.vim
ln -s $BASEDIR/.vim ~/.vim
# For neovim
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
rm -rf $XDG_CONFIG_HOME/nvim
rm $XDG_CONFIG_HOME/nvim
ln -s ~/.vim $XDG_CONFIG_HOME/nvim
rm -rf $XDG_CONFIG_HOME/nvim/init.vim
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
# make vimproc
cd ~/.vim/bundle/vimproc.vim
make