From ea133d934247f29d4a0bf324960f370e463063b2 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 9 Mar 2022 01:42:46 +0000 Subject: Add git-mirror.cron --- scripts/git-mirror.cron | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 scripts/git-mirror.cron (limited to 'scripts') 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 -- cgit v1.2.3