Browse Source

check whether bundle installed

- just by checking content

Conflicts:

	autoload/vundle/installer.vim
events
gmarik 15 years ago
parent
commit
b32ac42e06
2 changed files with 10 additions and 2 deletions
  1. +4
    -0
      autoload/vundle/config.vim
  2. +6
    -2
      autoload/vundle/installer.vim

+ 4
- 0
autoload/vundle/config.vim View File

@ -85,6 +85,10 @@ func! s:bundle.nosync()
return has_key(self, 'sync') && 'no' == self.sync()
endf
func! s:bundle.installed()
return !empty(split(globpath(self.path(), '*'), "\n"))
endf
func! s:bundle.path()
if self.nosync()
if isdirectory(expand(self.uri))


+ 6
- 2
autoload/vundle/installer.vim View File

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


Loading…
Cancel
Save