Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 52 lines (39 sloc) 1.107 kB
0408329 @theycallmeswift Point bootstrap.sh to the correct interpreter.
theycallmeswift authored
1 #!/usr/bin/env sh
925b986 @spf13 tweaking the bootstrap file... better error handling
authored
2
6b6864f @spf13 Few improvements to the bootstrap file.
authored
3 endpath="$HOME/.spf13-vim-3"
fcdabb8 @spf13 updated bootstrap to clone 3.0 branch
authored
4
925b986 @spf13 tweaking the bootstrap file... better error handling
authored
5 warn() {
6 echo "$1" >&2
7 }
8
9 die() {
10 warn "$1"
11 exit 1
12 }
13
f29bc3d @spf13 more bootstrap.sh fixes (should work better in more shells now)
authored
14 lnif() {
2a0cd04 @spf13 making the installer also serve as updater & do so gracefully
authored
15 if [ ! -e $2 ] ; then
16 ln -s $1 $2
17 fi
18 }
19
20 echo "Thanks for installing spf13-vim\n"
925b986 @spf13 tweaking the bootstrap file... better error handling
authored
21
22 # Backup existing .vim stuff
2f419b9 @spf13 Updated readme. bootstrap install script. Better installation
authored
23 echo "backing up current vim config\n"
6b6864f @spf13 Few improvements to the bootstrap file.
authored
24 today=`date +%Y%m%d`
52355ab @kevinwaddle Fix symlink check bug in dotfiles backup.
kevinwaddle authored
25 for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc; do [ -e $i ] && [ ! -L $i ] && mv $i $i.$today; done
925b986 @spf13 tweaking the bootstrap file... better error handling
authored
26
2a0cd04 @spf13 making the installer also serve as updater & do so gracefully
authored
27
8b2c08c @spf13 fixing some of the bootstrap issues
authored
28 if [ ! -e $endpath/.git ]; then
2a0cd04 @spf13 making the installer also serve as updater & do so gracefully
authored
29 echo "cloning spf13-vim\n"
30 git clone --recursive -b 3.0 http://github.com/spf13/spf13-vim.git $endpath
31 else
32 echo "updating spf13-vim\n"
33 cd $endpath && git pull
34 fi
cc262c5 @spf13 Moving Vundle to be it's own bundle. Now can update itself.
authored
35
8b2c08c @spf13 fixing some of the bootstrap issues
authored
36
37 echo "setting up symlinks"
38 lnif $endpath/.vimrc $HOME/.vimrc
39 lnif $endpath/.vimrc.bundles $HOME/.vimrc.bundles
40 lnif $endpath/.vim $HOME/.vim
41 if [ ! -d $endpath/.vim/bundle ]; then
42 mkdir -p $endpath/.vim/bundle
43 fi
44
45 if [ ! -e $HOME/.vim/bundle/vundle ]; then
46 echo "Installing Vundle"
47 git clone http://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle
48 fi
49
50 echo "update/install plugins using Vundle"
2c78aea @jhnwsk moved bundles to .vimrc.bundles
jhnwsk authored
51 vim -u $endpath/.vimrc.bundles - +BundleInstall! +BundleClean +qall
Something went wrong with that request. Please try again.