summaryrefslogtreecommitdiff
path: root/scripts/git-mirror.cron
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/git-mirror.cron')
-rwxr-xr-xscripts/git-mirror.cron8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/git-mirror.cron b/scripts/git-mirror.cron
new file mode 100755
index 0000000..4dc385f
--- /dev/null
+++ b/scripts/git-mirror.cron
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+find /var/git -maxdepth 2 -name config -type f | \
+ xargs grep -F '[remote "github"]' -l | \
+ xargs dirname | \
+ while read d
+ do git -C $d push -q github --mirror || echo "Mirroring $d failed"
+ done