From 080dca2a578f5c00d5b91e65c43a29cb0f6232e8 Mon Sep 17 00:00:00 2001 From: jwansek Date: Sun, 18 Sep 2022 21:24:05 +0100 Subject: Added post-push symlink --- make_repo.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'make_repo.py') diff --git a/make_repo.py b/make_repo.py index ea585c2..f40ed9a 100755 --- a/make_repo.py +++ b/make_repo.py @@ -62,6 +62,8 @@ with ChangeCWD(repo_dir): with open(os.path.join(repo_dir, "config"), "a") as f: f.write("[gitweb]\n\towner = %s <%s>" % (author, author_email)) +subprocess.run(["ln", "-s", os.path.join(os.path.dirname(conf_path), "post-receive-hook.sh"), os.path.join(repo_dir, "hooks", "post-receive")]) + if input("Would you like the repository to remain bare? Useful for making mirrors of Github repos. : ").lower() != "y": with tempfile.TemporaryDirectory() as tempdir: subprocess.run(["git", "clone", repo_url, tempdir]) -- cgit v1.2.3