summaryrefslogtreecommitdiff
path: root/repo/mkhooks
diff options
context:
space:
mode:
authorHayden Hamilton <hayden@hhvn.uk>2026-06-06 18:25:06 +0100
committerHayden Hamilton <hayden@hhvn.uk>2026-06-06 18:25:06 +0100
commit961d741871e79a131a4655023fb6f713cb83c265 (patch)
tree4275baebc994e1acd2a62417b21fdc828677db03 /repo/mkhooks
parent413e5ce219527fe56c9976571a1ffc35743d35fc (diff)
stagit, go module handling, git hooks
Diffstat (limited to 'repo/mkhooks')
-rwxr-xr-xrepo/mkhooks21
1 files changed, 21 insertions, 0 deletions
diff --git a/repo/mkhooks b/repo/mkhooks
new file mode 100755
index 0000000..f02964f
--- /dev/null
+++ b/repo/mkhooks
@@ -0,0 +1,21 @@
+#!/bin/rc
+
+user = _git
+gitdir = /var/git
+
+# just assume post-receive will always exists. I know. ugly
+hookdir = `{dirname `{whatis repo/hooks/post-receive}}
+
+fn as {
+ doas -u $user $*
+}
+
+for (repo in $gitdir/*) {
+ for (hook in $hookdir/*) {
+ dest = $repo/hooks/`{basename $hook}
+
+ if (!test -e $dest) {
+ ln -s $hook $dest
+ }
+ }
+}