Skip to content

Commit 925b986

Browse files
committed
tweaking the bootstrap file... better error handling
1 parent 13744bd commit 925b986

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

bootstrap.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
#!/bin/env sh
2+
3+
warn() {
4+
echo "$1" >&2
5+
}
6+
7+
die() {
8+
warn "$1"
9+
exit 1
10+
}
11+
212
echo "thanks for installing spf13-vim\n"
13+
14+
# Backup existing .vim stuff
315
echo "backing up current vim config\n"
416
for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
17+
18+
519
echo "cloning spf13-vim\n"
620
git clone --recursive git://github.com/spf13/spf13-vim.git ~/.spf13-vim
721
ln -s ~/.spf13-vim/.vimrc ~/.vimrc
822
ln -s ~/.spf13-vim/.vim ~/.vim
23+
24+
25+
# Build command-t for your system
926
echo "building command-t executable\n"
1027
echo "command-t depends on ruby and rake to be present\n"
1128
cd ~/.vim/bundle/command-t
12-
rake make
29+
(ruby extconf.rb && make clean && make) || warn "Ruby compilation failed. Ruby not installed, maybe?"

0 commit comments

Comments
 (0)