mirror of
https://github.com/servo/servo.git
synced 2025-06-13 10:54:29 +00:00
DRY submodule updating by utilizing existing update-submodules command
This might allow us to merge #5648
This commit is contained in:
parent
c63fc4dc13
commit
9708a386fc
1 changed files with 1 additions and 9 deletions
|
@ -224,15 +224,7 @@ class CommandBase(object):
|
||||||
if self.context.bootstrapped:
|
if self.context.bootstrapped:
|
||||||
return
|
return
|
||||||
|
|
||||||
subprocess.check_call(["git", "submodule", "--quiet", "sync", "--recursive"])
|
Registrar.dispatch("update-submodules", context=self.context)
|
||||||
submodules = subprocess.check_output(["git", "submodule", "status"])
|
|
||||||
for line in submodules.split('\n'):
|
|
||||||
components = line.strip().split(' ')
|
|
||||||
if len(components) > 1 and components[0].startswith(('-', '+')):
|
|
||||||
module_path = components[1]
|
|
||||||
subprocess.check_call(["git", "submodule", "update",
|
|
||||||
"--init", "--recursive",
|
|
||||||
"--", module_path])
|
|
||||||
|
|
||||||
if not self.config["tools"]["system-rust"] and \
|
if not self.config["tools"]["system-rust"] and \
|
||||||
not path.exists(path.join(
|
not path.exists(path.join(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue