From 139498855b23448c31c94014df1c1249efbc1905 Mon Sep 17 00:00:00 2001 From: gmarik Date: Sat, 23 Jul 2011 19:12:28 -0500 Subject: [PATCH] some MSWin fixes --- autoload/vundle/scripts.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index a9a7fa4..55554ce 100644 --- a/autoload/vundle/scripts.vim +++ b/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