Skip to content

Commit

Permalink
an utility script for developers to update scripts which are not git …
Browse files Browse the repository at this point in the history
…modules
  • Loading branch information
flavius committed May 30, 2011
1 parent cf7cfa0 commit e6d11e2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions fetch-scripts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# This script fetches or updates local vim scripts which are not git modules

MYDIR="`dirname $(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")`"
CURL="curl -O -J"


#TODO install each download based on the file type
#currently, the following are zips: bufexplorer, cvim, taglist

VIMFILES=("sessionman.vim" "autoclose.vim" "a.vim" "showmarks.vim")
VIMFILESURLS=("http://www.vim.org/scripts/download_script.php?src_id=15599"
"http://www.vim.org/scripts/download_script.php?src_id=10873"
"http://www.vim.org/scripts/download_script.php?src_id=7218"
"http://www.vim.org/scripts/script.php?script_id=152"
)
VIMFILESLOCATIONS=(".vim/bundle/rbtweaks/plugin/"
".vim/bundle/rbtweaks/plugin/"
".vim/bundle/rbtweaks/plugin/"
".vim/bundle/rbtweaks/plugin/"
)

for (( i = 0 ; i < ${#VIMFILES[@]} ; i++ ))
do
cd ${VIMFILESLOCATIONS[$i]}
if [ -e ${VIMFILES[$i]} ]
then rm ${VIMFILES[$i]} #TODO do a diff
fi
$CURL ${VIMFILESURLS[$i]}
done

0 comments on commit e6d11e2

Please sign in to comment.