diff options
| author | patrick-scho | 2025-06-03 14:51:28 +0200 |
|---|---|---|
| committer | patrick-scho | 2025-06-03 14:51:28 +0200 |
| commit | 90adeedc76015870bacbe292de6331d077307200 (patch) | |
| tree | 0215b9f5433beaef76cdfec05b9e94e81d183736 | |
| parent | b6f6ce350d6080e2b2b7a6420447307fc93f56c4 (diff) | |
| download | git-hooks-90adeedc76015870bacbe292de6331d077307200.tar.gz git-hooks-90adeedc76015870bacbe292de6331d077307200.zip | |
add chmod to git-hooks/post-receive
| -rwxr-xr-x | git-hooks/post-receive | 6 |
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]) |
