[ADD] fork project with fast option

- Ignore the repo if already created
This commit is contained in:
Mathieu Benoit 2020-10-02 00:34:40 -04:00
parent face278168
commit 47714027ab

View file

@ -39,6 +39,8 @@ def get_config():
help="Ignore fork to generate only manifest.")
parser.add_argument('-f', "--force", action="store_true",
help="Force rewrite remote.")
parser.add_argument("--fast", action="store_true",
help="Ignore if repo already exist.")
parser.add_argument('--github_token', dest="github_token",
default=config.get(CST_EL_GITHUB_TOKEN),
help="GitHub token generated by user")
@ -69,6 +71,8 @@ def main():
for repo in lst_repo:
i += 1
print(f"Nb element {i}/{total} - {repo.get('project_name')}")
if config.fast and repo.get("is_submodule") and os.path.isdir(repo.get("path")):
continue
url = repo.get("url")
try: