From f197962027a09d1442a44748cef5016ad0b44bdf Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 21 Feb 2012 14:16:37 +0100 Subject: [PATCH] git mirror update script --- misc/infrastructure/git-mirror-update.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 misc/infrastructure/git-mirror-update.sh 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 -- 2.39.2