Browse Source

Merge fc21691f63 into 84c9a54254

pull/234/merge
killphi 13 years ago
parent
commit
972e28fe78
1 changed files with 44 additions and 1 deletions
  1. +44
    -1
      autoload/vundle/installer.vim

+ 44
- 1
autoload/vundle/installer.vim View File

@ -165,11 +165,28 @@ endf
func! vundle#installer#delete(bang, dir_name) abort
let bundle = vundle#config#init_bundle(a:dir_name, {})
" unlink ftdetect files again
if !(has('win32') || has('win64'))
let unlink_target = expand("$HOME/.vim/ftdetect/", 1)
let unlink_files = glob(bundle.path().'/ftdetect/*.vim', 1, 1)
for file in unlink_files
let cmd = 'rm -f '. unlink_target .fnamemodify(file, ':p:t')
let out = s:system(cmd)
call s:log('')
call s:log('unlink script file: '.file)
call s:log('$ '.cmd)
call s:log('> '.out)
endfor
endif
let cmd = (has('win32') || has('win64')) ?
\ 'rmdir /S /Q' :
\ 'rm -rf'
let bundle = vundle#config#init_bundle(a:dir_name, {})
let cmd .= ' '.shellescape(bundle.path())
let out = s:system(cmd)
@ -230,6 +247,32 @@ func! s:sync(bang, bundle) abort
return 'error'
end
" link ftdetect/*.vim in UNIX systems
if !(has('win32') || has('win64'))
let link_target = expand("$HOME/.vim/ftdetect/", 1)
let link_files = glob(a:bundle.path().'/ftdetect/*.vim', 1, 1)
if !isdirectory(link_target)
let cmd = 'mkdir -p ' . link_target
let out = s:system(cmd)
call s:log('')
call s:log('create ftdetect dir')
call s:log('$ '.cmd)
call s:log('> '.out)
endif
for file in link_files
let cmd = 'ln -sf '. file .' '. link_target
let out = s:system(cmd)
call s:log('')
call s:log('link script file: '.file)
call s:log('$ '.cmd)
call s:log('> '.out)
endfor
endif
if empty(initial_sha)
return 'new'
endif


Loading…
Cancel
Save