Skip to content
Permalink
Browse files

Merge branch 'master' into v

  • Loading branch information...
gmarik committed Jul 24, 2011
2 parents 191de1f + 1394988 commit 51d1bc60e4774105a9a3c822460bde60cde316a8
Showing with 6 additions and 2 deletions.
  1. +6 −2 autoload/vundle/scripts.vim
@@ -71,8 +71,12 @@ func! s:fetch_scripts(to)
silent exec '!curl --fail -s -o '.shellescape(a:to).' '.l:vim_scripts_json
elseif executable("wget")
let temp = shellescape(tempname())
let switch = (has('win32') || has('win64')) ? ' /Y ' : ' -f '
silent exec '!wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv '.switch.' '.temp.' '.shellescape(a:to)
let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.shellescape(a:to)
if (has('win32') || has('win64'))
let cmd = substitute(cmd, 'mv -f ', 'mv /Y ') " change force flag
let cmd = '"'.cmd.'"' " enclose in quotes so && joined cmds work
end
silent exec '!'.cmd
else
echoerr 'Error curl or wget is not available!'
return 1

0 comments on commit 51d1bc6

Please sign in to comment.
You can’t perform that action at this time.