#! /bin/bash if [[ -z $1 ]] then if [[ -z $VIMRUNTIME ]] then VIMRUNTIME=$HOME/.vim fi else VIMRUNTIME="$1" fi echo "Installing to: $VIMRUNTIME ..." for dir in after autoload colors compiler doc ftdetect ftplugin indent plugin syntax do if [[ -d $dir ]] then CMD="cp -r $dir/* $VIMRUNTIME/$dir/" echo " $CMD" $CMD || exit fi done echo "Updating help tags ..." cd $VIMRUNTIME/doc && vim -c 'helptags . | :q' echo "Done: plugin installed".