aboutsummaryrefslogtreecommitdiffstats
path: root/make_repo.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-09-18 21:24:05 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2022-09-18 21:24:05 +0100
commit080dca2a578f5c00d5b91e65c43a29cb0f6232e8 (patch)
tree3ea25518c16f7238fc7605c6b2b493ca5958b188 /make_repo.py
parent4582189b157c439e7ff3219b1c9d6224f2eed03b (diff)
downloadgit-scripts-080dca2a578f5c00d5b91e65c43a29cb0f6232e8.tar.gz
git-scripts-080dca2a578f5c00d5b91e65c43a29cb0f6232e8.zip
Added post-push symlink
Diffstat (limited to 'make_repo.py')
-rwxr-xr-xmake_repo.py2
1 files changed, 2 insertions, 0 deletions
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. <y/n>: ").lower() != "y":
with tempfile.TemporaryDirectory() as tempdir:
subprocess.run(["git", "clone", repo_url, tempdir])