Browse Source

add support git submodule initialization.

pull/91/head
MURAOKA Yusuke 14 years ago
parent
commit
e76ccce7df
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      autoload/vundle/installer.vim

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

@ -186,16 +186,17 @@ endf
func! s:sync(bang, bundle) abort
let git_dir = expand(a:bundle.path().'/.git/')
let dest_dir = shellescape(a:bundle.path())
if isdirectory(git_dir)
if !(a:bang) | return 'todate' | endif
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
let cmd = 'cd '.dest_dir.' && git pull'
if (has('win32') || has('win64'))
let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
let cmd = '"'.cmd.'"' " enclose in quotes
endif
else
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
let cmd = 'git clone '.a:bundle.uri.' '.dest_dir.' && cd '.dest_dir.' && git submodule init && git submodule update'
endif
let out = s:system(cmd)


Loading…
Cancel
Save