Browse Source

check whether bundle installed

- just by checking content
events
gmarik 15 years ago
parent
commit
4c9ee90991
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      autoload/vundle/installer.vim

+ 5
- 4
autoload/vundle/installer.vim View File

@ -62,11 +62,12 @@ func! s:helptags(rtp) abort
helptags `=a:rtp.'/doc/'` helptags `=a:rtp.'/doc/'`
endf endf
func! s:sync(bang, bundle) abort
let cwd = getcwd()
func! s:installed(bundle) abort
return !empty(split(globpath(a:bundle.path(), '*'), "\n"))
endf
let git_dir = expand(a:bundle.path().'/.git')
if isdirectory(git_dir)
func! vundle#installer#sync(bang, bundle) abort
if s:installed(a:bundle)
if !(a:bang) | return 0 | endif if !(a:bang) | return 0 | endif
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull' let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
else else


Loading…
Cancel
Save