From 47714027ab634af842f89101a8e1b2876592394b Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 2 Oct 2020 00:34:40 -0400 Subject: [PATCH] [ADD] fork project with fast option - Ignore the repo if already created --- script/fork_project_ERPLibre.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/fork_project_ERPLibre.py b/script/fork_project_ERPLibre.py index 6b41317..dbd198e 100644 --- a/script/fork_project_ERPLibre.py +++ b/script/fork_project_ERPLibre.py @@ -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: