From 49e65867eef686f2fd35d4982f465513b58abedb Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 2 Nov 2021 10:30:49 +0000 Subject: separated syncing and building --- build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build.py') diff --git a/build.py b/build.py index 5059d21..291c2ab 100644 --- a/build.py +++ b/build.py @@ -271,10 +271,12 @@ def create_repos(): for repo in get_repos(): print(repo) + name = ".".join(repo.split("/")[-1].split(".")[:-1]) - os.system(f"cd {dist}/git; git clone {repo}") + os.system(f"mkdir -p {dist}/git/{name} ;\ + cd {dist}/git/{name} ;\ + git pull || git clone {name}") - name = ".".join(repo.split("/")[-1].split(".")[:-1]) command = subprocess.run(f"cd {dist}/git/{name} && git log --pretty=format:'%h%x09%an%x09%ad%x09%s' --no-decorate -1", stdout=subprocess.PIPE, shell=True) -- cgit v1.2.1