]> gitweb.ps.run Git - git-hooks/commitdiff
add git-hooks/post-receive
authorpatrick-scho <patrick.schoenberger@posteo.de>
Tue, 3 Jun 2025 12:14:04 +0000 (14:14 +0200)
committerpatrick-scho <patrick.schoenberger@posteo.de>
Tue, 3 Jun 2025 12:14:04 +0000 (14:14 +0200)
git-hooks/post-receive [new file with mode: 0755]

diff --git a/git-hooks/post-receive b/git-hooks/post-receive
new file mode 100755 (executable)
index 0000000..3336801
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+import os
+
+dirs = [d for d in os.listdir() if not d.startswith('.')]
+
+for d in dirs:
+    files = os.listdir(d)
+
+    for f in files:
+        print(f'cp {d}/{f} /srv/git/{d}/hooks/{f}')