treesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorpatrick-scho2025-06-03 14:51:28 +0200
committerpatrick-scho2025-06-03 14:51:28 +0200
commit90adeedc76015870bacbe292de6331d077307200 (patch)
tree0215b9f5433beaef76cdfec05b9e94e81d183736
parentb6f6ce350d6080e2b2b7a6420447307fc93f56c4 (diff)
downloadgit-hooks-90adeedc76015870bacbe292de6331d077307200.tar.gz
git-hooks-90adeedc76015870bacbe292de6331d077307200.zip
add chmod to git-hooks/post-receive
-rwxr-xr-xgit-hooks/post-receive6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-hooks/post-receive b/git-hooks/post-receive
index 2af01a8..2c425d7 100755
--- a/git-hooks/post-receive
+++ b/git-hooks/post-receive
@@ -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])