From 4c9ee9099120dfa9463feea44f35673934bc3ba5 Mon Sep 17 00:00:00 2001 From: gmarik Date: Tue, 3 May 2011 01:02:17 -0500 Subject: [PATCH] check whether bundle installed - just by checking content --- autoload/vundle/installer.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index cb783a7..502240b 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -62,11 +62,12 @@ func! s:helptags(rtp) abort helptags `=a:rtp.'/doc/'` 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 let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull' else