From: patrick-scho Date: Tue, 3 Jun 2025 12:51:28 +0000 (+0200) Subject: add chmod to git-hooks/post-receive X-Git-Url: https://gitweb.ps.run/git-hooks/commitdiff_plain/90adeedc76015870bacbe292de6331d077307200?hp=b6f6ce350d6080e2b2b7a6420447307fc93f56c4 add chmod to git-hooks/post-receive --- 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])