From 38543184322d90db7695b2e8d05b1e62a8eb8fe1 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 30 Mar 2011 00:14:53 -0600 Subject: [PATCH] Use DOS commands on Windows --- autoload/vundle/scripts.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 652153e..8e48d8c 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -40,8 +40,14 @@ endf func! s:fetch_scripts(to) let temp = tempname() - exec '!curl http://vim-scripts.org/api/scripts.json > '.temp. - \ '&& mkdir -p $(dirname '.a:to.') && mv -f '.temp.' '.a:to + 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. + \ '&& mkdir -p $(dirname '.a:to.') && mv -f '.temp.' '.a:to + endif endf func! s:load_scripts(bang)