From e2734f595d2be7187a8e82ee6377d56b787169bd Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 5 Oct 2010 14:03:41 +0200 Subject: [PATCH] also upload that index --- misc/tools/xonotic-map-compiler-autobuild | 50 +++++++++-------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 066b0553..173f1937 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -279,18 +279,23 @@ rundownload() cd ../.. } +branches() +{ + git for-each-ref 'refs/remotes' | grep -vE ' refs/remotes/([^/]*/HEAD|.*/archived/.*)$' +} + +runmakeindex() +{ + cd data/xonotic-maps.pk3dir + branches | while read -r HASH TYPE REFNAME; do + allmaps "$HASH" indexthemap "$REFNAME" + done +} + case "$1" in build) cd data/xonotic-maps.pk3dir - git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do - case "$REFNAME" in - */HEAD) - continue - ;; - */archived/*) - continue - ;; - esac + branches | while read -r HASH TYPE REFNAME; do if [ -f "$build_cachedir/$HASH" ]; then continue fi @@ -301,15 +306,7 @@ case "$1" in ;; screenshot) cd data/xonotic-maps.pk3dir - git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do - case "$REFNAME" in - */HEAD) - continue - ;; - */archived/*) - continue - ;; - esac + branches | while read -r HASH TYPE REFNAME; do if [ -f "$screenshot_cachedir/$HASH" ]; then continue fi @@ -325,21 +322,12 @@ case "$1" in touch "$screenshot_cachedir/$HASH" done git checkout -f master + runmakeindex > branches.idx.new + rsync -vaSHP "$branches.idx.new" "$url_ssh""branches.idx.new" + rm -f branches.idx.new ;; makeindex) - cd data/xonotic-maps.pk3dir - git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do - case "$REFNAME" in - */HEAD) - continue - ;; - */archived/*) - continue - ;; - esac - allmaps "$HASH" indexthemap "$REFNAME" - done - git checkout -f master + runmakeindex ;; download) rundownload -- 2.39.2