X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler-autobuild;h=fec3e114585ed2a6ca104e12dd57e54a3aa06879;hp=5ed8665b6a58d9e9923ea803ebbac697dba77ff7;hb=e1413a8fcc9f6a824228f9f4be81a7339374fd26;hpb=7e507cc3b710a03b5f36a614205795363e6f9d96 diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 5ed8665b..fec3e114 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -10,6 +10,8 @@ screenshot_cachedir="$HOME/xonotic-map-screenshot.cache/" build_override="-bsp_timeout 900 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900" screenshot_override="9 300" +getthemap_fail=false + allmaps() { for F in maps/*.map.options; do @@ -187,7 +189,8 @@ screenshotthemap() fi rm -rf ~/.xonotic ( - ../../misc/tools/xonotic-map-screenshot "$M" $screenshot_override +scr_screenshot_name "$M" + cd ../.. + misc/tools/xonotic-map-screenshot "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" ) if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then if [ -n "$IRCSPAM" ]; then @@ -198,7 +201,6 @@ screenshotthemap() if [ -n "$IRCSPAM" ]; then ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" > "maps/$M.ircss" fi - mv ~/.xonotic/data/screenshots "$M-$blobhash" ln -snf "../$M-$blobhash" "$M" # from ALL branches, so beware! rsync -vaSHP "$M-$blobhash" "$url_ssh" rsync -vaSHP "$M" "$url_ssh""latest/" @@ -227,6 +229,7 @@ getthemap() if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then rm -f "$bspdir/$M-$blobhash.pk3" echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file" + getthemap_fail=true return 0 fi } @@ -255,8 +258,11 @@ case "$1" in git reset --hard git clean -xfd git checkout -f "$HASH" - allmaps screenshotthemap "$REFNAME" "$HASH" "$url" - touch "$screenshot_cachedir/$HASH" + allmaps getthemap "$url" "$bspdir.old" "$bspdir" + if ! $getthemap_fail; then + allmaps screenshotthemap "$REFNAME" "$HASH" "$url" + touch "$screenshot_cachedir/$HASH" + fi done git checkout -f master ;;