From 262faee7c475eae7a2883695753166fb0d2977db Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Wed, 4 Aug 2021 11:50:24 -0500 Subject: troubleshoot --- mirror.py | 7 +------ mirrors.toml | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mirror.py b/mirror.py index 14051e2..e0f8e09 100644 --- a/mirror.py +++ b/mirror.py @@ -9,15 +9,10 @@ with open("mirrors.toml", "r") as f: repositories = toml.load(f) for path in repositories.keys(): - local_path = pathlib.Path(path) + local_path = pathlib.Path("/git") / pathlib.Path(path) local_path.mkdir(exist_ok=True, parents=True) - primary_url = repositories[path]["primary"] secondary_urls = repositories[path]["secondary"] os.chdir(str(local_path)) - if not pathlib.Path("git-daemon-export-ok").is_file(): - subprocess.run(["git", "init", "--bare"]) - subprocess.run(["git", "remote", "add", "origin", primary_url]) - pathlib.Path("git-daemon-export-ok").touch() subprocess.run(["git", "remote", "update"]) subprocess.run(["git", "fetch", "origin", "'*:*'"]) for url in secondary_urls: diff --git a/mirrors.toml b/mirrors.toml index 6645045..ea90aec 100644 --- a/mirrors.toml +++ b/mirrors.toml @@ -1,5 +1,5 @@ ["uw-madison-chem-shops/wisconsin-photoreactor.git"] primary = "https://github.com/uw-madison-chem-shops/wisconsin-photoreactor.git" secondary = ["https://git.chem.wisc.edu/gellman-group/wisconsin-photoreactor.git", - "git@gitlab.com:uw-madison-chem-shops/wisconsin-photoreactor.git"] + ] -- cgit v1.2.3