forked from balintbrews/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoinstall.sh
38 lines (29 loc) · 998 Bytes
/
autoinstall.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
#!/bin/sh
INSTALL_TO=~
warn() {
echo "$1" >&2
}
die() {
warn "$1"
exit 1
}
[ -e "$INSTALL_TO/vimrc" ] && die "$INSTALL_TO/vimrc already exists."
[ -e "~/.vim" ] && die "~/.vim already exists."
[ -e "~/.vimrc" ] && die "~/.vimrc already exists."
cd "$INSTALL_TO"
git clone git://github.com/balintk/vimrc.git
cd vimrc
# Download vim plugin bundles
git submodule init
git submodule update
# Compile command-t for the current platform
cd vim/bundle/command-t/ruby/command-t
(ruby extconf.rb && make clean && make) || warn "Ruby compilation failed. Ruby not installed, maybe?"
# Symlink ~/.vim and ~/.vimrc
cd ~
ln -s "$INSTALL_TO/vimrc/vimrc" .vimrc
ln -s "$INSTALL_TO/vimrc/vim" .vim
echo "-------------------------------------------------------------------------------"
echo "Installed and configured .vim, have fun!"
echo "If you want to push code to the balintk/vimrc repository, run this command:"
echo "cd ~/vimrc; git remote set-url origin [email protected]:balintk/vimrc.git"