diff options
| -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]) |
