litex_setup/update: do a git submodule update --init --recursive on repos with recursive set to True.

Simplify for example pythondata-cpu-vexriscv-smp updates.
This commit is contained in:
Florent Kermarrec 2021-01-27 07:55:09 +01:00
parent 2f89e0aecf
commit 61034fe0f9
1 changed files with 2 additions and 0 deletions

View File

@ -151,6 +151,8 @@ if "update" in sys.argv[1:]:
os.chdir(os.path.join(current_path, name))
subprocess.check_call("git checkout master", shell=True)
subprocess.check_call("git pull --ff-only", shell=True)
if need_recursive:
subprocess.check_call("git submodule update --init --recursive", shell=True)
if sha1 is not None:
os.chdir(os.path.join(current_path, name))
os.system("git checkout {:7x}".format(sha1))