This commit is contained in:
gmarik 2011-07-23 11:57:36 -05:00
commit a9609d88c4

View File

@ -66,7 +66,15 @@ func! s:fetch_scripts(to)
call mkdir(scripts_dir, "p") call mkdir(scripts_dir, "p")
endif endif
silent exec '!curl --fail -s -o '.shellescape(a:to).' http://vim-scripts.org/api/scripts.json' let l:vim_scripts_json = 'http://vim-scripts.org/api/scripts.json'
if executable("curl")
silent exec '!curl --fail -s -o '.shellescape(a:to).' '.l:vim_scripts_json
elseif executable("wget")
silent exec '!wget -q -O '.shellescape(a:to).' '.l:vim_scripts_json
else
echoerr 'Error curl or wget is not available!'
return 1
endif
if (0 != v:shell_error) if (0 != v:shell_error)
echoerr 'Error fetching scripts!' echoerr 'Error fetching scripts!'