diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-09 01:42:46 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-03-09 01:42:46 +0000 |
commit | ea133d934247f29d4a0bf324960f370e463063b2 (patch) | |
tree | 268be1c721173e18a2c3eb0009a4867e2a4da35b /scripts | |
parent | Add transmission config (diff) | |
download | config-ea133d934247f29d4a0bf324960f370e463063b2.tar.bz2 config-ea133d934247f29d4a0bf324960f370e463063b2.tar.xz config-ea133d934247f29d4a0bf324960f370e463063b2.zip |
Add git-mirror.cron
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/git-mirror.cron | 8 |
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 |