Auto update script for pathogen bundles


#vim auto update bundle script
 #author : Atheotsky

#locate self location & move to it
 cd `dirname $0`

#update function
 updatePlugins()
 {
 cd "$1"
 echo "updating $1 ......"
 git pull
 cd ..
 }

#build array of folder under current location
 directories=$(ls -l | egrep '^d' | awk '{print $9}')

#use loop with array
 for directory in $directories; do
 #execute function
 updatePlugins $directory
 done

echo "Update completed!"

Leave a Comment