git submodule update --init --recursive (#18)

This commit is contained in:
Junegunn Choi 2014-06-03 18:51:01 +09:00
parent de81f95f69
commit 12b5dcb903

View File

@ -397,7 +397,7 @@ function! s:update_serial(pull)
if valid if valid
let result = a:pull ? let result = a:pull ?
\ s:system( \ s:system(
\ printf('git checkout -q %s 2>&1 && git pull origin %s 2>&1', \ printf('git checkout -q %s 2>&1 && git pull origin %s 2>&1 && git submodule update --init --recursive 2>&1',
\ s:shellesc(spec.branch), s:shellesc(spec.branch))) : 'Already installed' \ s:shellesc(spec.branch), s:shellesc(spec.branch))) : 'Already installed'
let error = a:pull ? v:shell_error != 0 : 0 let error = a:pull ? v:shell_error != 0 : 0
else else
@ -410,7 +410,7 @@ function! s:update_serial(pull)
endif endif
execute 'cd '.base execute 'cd '.base
let result = s:system( let result = s:system(
\ printf('git clone --recursive %s -b %s %s 2>&1', \ printf('git clone --recursive %s -b %s %s 2>&1 && git submodule update --init --recursive 2>&1',
\ s:shellesc(spec.uri), \ s:shellesc(spec.uri),
\ s:shellesc(spec.branch), \ s:shellesc(spec.branch),
\ s:shellesc(substitute(spec.dir, '[\/]\+$', '', '')))) \ s:shellesc(substitute(spec.dir, '[\/]\+$', '', ''))))
@ -558,7 +558,7 @@ function! s:update_parallel(pull, threads)
"PlugClean required."].join($/)] "PlugClean required."].join($/)]
else else
if pull if pull
bt.call "#{cd} #{dir} && git checkout -q #{branch} 2>&1 && git pull origin #{branch} 2>&1" bt.call "#{cd} #{dir} && git checkout -q #{branch} 2>&1 && git pull origin #{branch} 2>&1 && git submodule update --init --recursive 2>&1"
else else
[true, skip] [true, skip]
end end
@ -566,7 +566,7 @@ function! s:update_parallel(pull, threads)
else else
FileUtils.mkdir_p(base) FileUtils.mkdir_p(base)
d = esc dir.sub(%r{[\\/]+$}, '') d = esc dir.sub(%r{[\\/]+$}, '')
bt.call "#{cd} #{base} && git clone --recursive #{uri} -b #{branch} #{d} 2>&1" bt.call "#{cd} #{base} && git clone --recursive #{uri} -b #{branch} #{d} 2>&1 && git submodule update --init --recursive 2>&1"
end end
log.call name, result, ok log.call name, result, ok
end end