]> gitweb.ps.run Git - git-hooks/commitdiff
add chmod to git-hooks/post-receive
authorpatrick-scho <patrick.schoenberger@posteo.de>
Tue, 3 Jun 2025 12:51:28 +0000 (14:51 +0200)
committerpatrick-scho <patrick.schoenberger@posteo.de>
Tue, 3 Jun 2025 12:51:28 +0000 (14:51 +0200)
git-hooks/post-receive

index 2af01a856829dce758fa3b6639d0fed60f0954a1..2c425d7c2d03e5ea6328da43731417245b8b385b 100755 (executable)
@@ -24,5 +24,9 @@ for d in dirs:
     for f in files:
         # print the hook and write it to the git repo
         file = check(["git", "--no-pager", "show", f"{BRANCH}:{d}/{f}"])
-        with open(f"/srv/git/{d}/hooks/{f}", "w") as fd:
+
+        hookpath = f"/srv/git/{d}/hooks/{f}"
+        with open(hookpath, "w") as fd:
             fd.write(file)
+
+        check(["chmod", "+x", hookpath])