forked from spf13/spf13-vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch-scripts
executable file
·30 lines (25 loc) · 991 Bytes
/
fetch-scripts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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