From: Rudolf Polzer Date: Tue, 21 Feb 2012 13:16:37 +0000 (+0100) Subject: git mirror update script X-Git-Tag: xonotic-v0.6.0~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f197962027a09d1442a44748cef5016ad0b44bdf;p=xonotic%2Fxonotic.git git mirror update script --- diff --git a/misc/infrastructure/git-mirror-update.sh b/misc/infrastructure/git-mirror-update.sh new file mode 100755 index 00000000..fca7ff65 --- /dev/null +++ b/misc/infrastructure/git-mirror-update.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +#exec >/dev/null 2>&1 + +mkdir -p /var/cache/git/xonotic +cd /var/cache/git/xonotic +ssh xonotic@git.xonotic.org ./send-git-configs.sh | tar xvf - + +for X in /var/cache/git/*/*.git; do + cd "$X" + git config remote.origin.fetch "+refs/*:refs/*" + git config remote.origin.mirror "true" + git config remote.origin.url "git://nl.git.xonotic.org/${X#/var/cache/git/}" + git fetch + git remote prune origin + git gc --auto + touch git-daemon-export-ok +done