Use DOS commands on Windows

This commit is contained in:
Brad Anderson 2011-03-30 00:14:53 -06:00
parent f1bac10257
commit 3854318432

View File

@ -40,8 +40,14 @@ endf
func! s:fetch_scripts(to) func! s:fetch_scripts(to)
let temp = tempname() let temp = tempname()
if has('win32') || has('win64')
let d = fnamemodify(expand(a:to), ":h")
exec '!curl http://vim-scripts.org/api/scripts.json > '.temp.
\ '&& mkdir '.d.' && move /Y '.temp.' '.a:to
else
exec '!curl http://vim-scripts.org/api/scripts.json > '.temp. exec '!curl http://vim-scripts.org/api/scripts.json > '.temp.
\ '&& mkdir -p $(dirname '.a:to.') && mv -f '.temp.' '.a:to \ '&& mkdir -p $(dirname '.a:to.') && mv -f '.temp.' '.a:to
endif
endf endf
func! s:load_scripts(bang) func! s:load_scripts(bang)