Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Adam C. Baker and Joe Nelson
executable file 50 lines (40 sloc) 1.313 kb
#!/usr/bin/env bash
msg() { echo "--- $@" 1>&2; }
detail() { echo " $@" 1>&2; }
for i in git make vim par; do
command -v $i >/dev/null
if [ $? -ne 0 ] ; then
msg "Installer requires ${i}. Please install $i and try again."
exit 1
fi
done
endpath="$HOME/.begriffs-vim"
if [ ! -e $endpath/.git ]; then
msg "Cloning begriffs/vimrc"
git clone https://github.com/begriffs/vimrc.git $endpath
else
msg "Existing installation detected"
msg "Updating from begriffs/vimrc"
cd $endpath && git pull
fi
if [ -e ~/.vim/colors ]; then
msg "Preserving color scheme files"
cp -R ~/.vim/colors $endpath/colors
fi
today=`date +%Y%m%d_%H%M%S`
msg "Backing up current vim config"
for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc; do [ -e $i ] && [ ! -L $i ] && mv $i $i.$today && detail "$i.$today"; done
msg "Creating symlinks"
detail "~/.vimrc -> $endpath/.vimrc"
detail "~/.vim -> $endpath/.vim"
ln -sf $endpath/.vimrc $HOME/.vimrc
if [ ! -d $endpath/.vim/bundle ]; then
mkdir -p $endpath/.vim/bundle
fi
ln -sf $endpath/.vim $HOME/.vim
if [ ! -e $HOME/.vim/bundle/vundle ]; then
msg "Installing Vundle"
git clone http://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle
fi
msg "Installing plugins using Vundle..."
vim -T dumb -Es -u $endpath/.vimrc +BundleInstall! +BundleClean! +qall
Jump to Line
Something went wrong with that request. Please try again.