summaryrefslogtreecommitdiff
path: root/setup-receive-hooks
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-10-15 18:38:33 -0400
committerRaghuram Subramani <raghus2247@gmail.com>2025-10-15 18:38:33 -0400
commit8f4e7304e6be91a45300f813faa9ffb9c7436144 (patch)
tree6282c8c8f5fb2f2a14b62cd7c4bdd3f3ecc5f93d /setup-receive-hooks
parent428761f1db5fbdc171a60188bce7eda03d4f63bf (diff)
add setup-receive-hookHEADmaster
Diffstat (limited to 'setup-receive-hooks')
-rwxr-xr-xsetup-receive-hooks10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup-receive-hooks b/setup-receive-hooks
new file mode 100755
index 0000000..dbaad48
--- /dev/null
+++ b/setup-receive-hooks
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+set -xe
+
+REPOSITORIES=$(find /home/git/* -name '*.git' -type d)
+
+for repo in $REPOSITORIES; do
+ echo 'git push github -f --mirror' > "$repo/hooks/post-receive"
+ chmod +x "$repo/hooks/post-receive"
+done