summaryrefslogtreecommitdiff
path: root/setup-recieve-hooks
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-10-15 16:18:19 -0400
committerRaghuram Subramani <raghus2247@gmail.com>2025-10-15 16:18:19 -0400
commita78560944934d7728ae8d2949a5201487c0e4867 (patch)
treed035c1158bf39de04c7ed4e2e45744f6b2effde0 /setup-recieve-hooks
parent794e1951e4817c812d5d1897b43df92b91fbd581 (diff)
add hooks to clones
Diffstat (limited to 'setup-recieve-hooks')
-rwxr-xr-xsetup-recieve-hooks10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup-recieve-hooks b/setup-recieve-hooks
new file mode 100755
index 0000000..dbaad48
--- /dev/null
+++ b/setup-recieve-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