Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull-submodules.py adding an option to download data #294

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pull-submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def print_help():
print ( " --sjtu : It will pull SJTU Git repositories. SSH grant required" )
print ( " --exclude:lib1,lib2 will prevent lib1,lib2 from being pulled" )
print ( " --onlylibs: It will pull only the REST library submodules" )
print ( " --data: It will pull also data based repositories" )
print ( " " )

if( len(sys.argv ) <= 1 ):
Expand All @@ -53,7 +54,11 @@ def print_help():
sys.exit(1)

exclude_elems = ["userguide", "data"]

for x in range(len(sys.argv) - 1):
if sys.argv[x + 1] == "--data":
exclude_elems = ["userguide"]

if sys.argv[x + 1] == "--lfna":
lfna = True
print("""\
Expand Down Expand Up @@ -162,6 +167,7 @@ def main():
if (not exclude and url.find("github") != -1) or (
url.find("lfna.unizar.es") != -1 and lfna) or (
url.find("gitlab.pandax.sjtu.edu.cn") != -1 and sjtu):
print("Pulling: ", end="")
print(fullpath.rstrip(), end='')
# init
p = subprocess.run(f"cd {root} && git submodule init {submodule}", #
Expand Down