From 1361fb8cc64baf75612dfb831582b7f2abcdd320 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sun, 30 Aug 2015 14:11:52 -0700 Subject: [PATCH] Add Vundle --- install.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/install.sh b/install.sh index 197a2d0..0b8ea21 100755 --- a/install.sh +++ b/install.sh @@ -11,6 +11,11 @@ if [ ! -d $BASEDIR ] ; then fi function prerequisites { + # Prerequisites require git + if ! which git > /dev/null ; then + echo 'No git, not installing extras.' > /dev/stderr + return + fi if which zsh > /dev/null ; then chsh -s `which zsh` if [ ! -d $HOME/.oh-my-zsh ] ; then @@ -19,6 +24,13 @@ function prerequisites { else echo "ZSH not found!" > /dev/stderr fi + if which vim > /dev/null ; then + mkdir -p $HOME/.vim/bundle + if [ ! -d $HOME/.vim/bundle/Vundle.vim ] ; then + git clone https://github.com/VundleVim/Vundle.vim.git \ + $HOME/.vim/bundle/Vundle.vim + fi + fi } function install_dir { @@ -35,6 +47,14 @@ function install_dir { done } +function postinstall { + # Install Vundle plugins + if [ -d $HOME/.vim/bundle/Vundle.vim ] ; then + vim +VundleInstall +qall + fi +} + prerequisites install_dir "${BASEDIR}" test -d "${BASEDIR}/private_dotfiles" && install_dir "${BASEDIR}/private_dotfiles" +postinstall