Browse Source

fallback to use wget

pull/63/head
Kohei Takahashi 15 years ago
parent
commit
47356d9ee5
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      autoload/vundle/scripts.vim

+ 9
- 1
autoload/vundle/scripts.vim View File

@ -66,7 +66,15 @@ func! s:fetch_scripts(to)
call mkdir(scripts_dir, "p")
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)
echoerr 'Error fetching scripts!'


Loading…
Cancel
Save