|
|
|
@ -41,9 +41,12 @@ endf |
|
|
|
func! s:fetch_scripts(to) |
|
|
|
let temp = tempname() |
|
|
|
if has('win32') || has('win64') |
|
|
|
let d = fnamemodify(expand(a:to), ":h") |
|
|
|
let scripts_dir = fnamemodify(expand(a:to), ":h") |
|
|
|
if !isdirectory(scripts_dir) |
|
|
|
call mkdir(scripts_dir, "p") |
|
|
|
endif |
|
|
|
exec '!curl http://vim-scripts.org/api/scripts.json > '.temp. |
|
|
|
\ '&& mkdir '.d.' && move /Y '.temp.' '.a:to |
|
|
|
\ '&& 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 |
|
|
|
|