Browse Source

some MSWin fixes

pull/71/head
gmarik 15 years ago
parent
commit
139498855b
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      autoload/vundle/scripts.vim

+ 6
- 2
autoload/vundle/scripts.vim View File

@ -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


Loading…
Cancel
Save