mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
waf: git_submodule: support recursive submodules
This commit is contained in:
parent
d57851e2a9
commit
6753b54b52
@ -40,17 +40,18 @@ import os.path
|
|||||||
|
|
||||||
class update_submodule(Task.Task):
|
class update_submodule(Task.Task):
|
||||||
color = 'BLUE'
|
color = 'BLUE'
|
||||||
run_str = '${GIT} -C ${SRC_ROOT} submodule update --init -- ${SUBMODULE_PATH}'
|
run_str = '${GIT} -C ${SRC_ROOT} submodule update --recursive --init -- ${SUBMODULE_PATH}'
|
||||||
|
|
||||||
def runnable_status(self):
|
def runnable_status(self):
|
||||||
e = self.env.get_flat
|
e = self.env.get_flat
|
||||||
cmd = e('GIT'), '-C', e('SRC_ROOT'), 'submodule', 'status', '--', e('SUBMODULE_PATH')
|
cmd = e('GIT'), '-C', e('SRC_ROOT'), 'submodule', 'status', '--recursive', '--', e('SUBMODULE_PATH')
|
||||||
out = self.generator.bld.cmd_and_log(cmd, quiet=Context.BOTH)
|
out = self.generator.bld.cmd_and_log(cmd, quiet=Context.BOTH)
|
||||||
|
|
||||||
# git submodule status uses a blank prefix for submodules that are up
|
# git submodule status uses a blank prefix for submodules that are up
|
||||||
# to date
|
# to date
|
||||||
if out[0] != ' ':
|
for line in out.splitlines():
|
||||||
return Task.RUN_ME
|
if line[0] != ' ':
|
||||||
|
return Task.RUN_ME
|
||||||
|
|
||||||
return Task.SKIP_ME
|
return Task.SKIP_ME
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user