X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler-autobuild;h=4d2798f057eddd5af451ca6c4c5fbd35de043263;hb=12918d22b9327ca1aabcccbaf32ed93503c031ed;hp=0b5cd720e4671f04d8937b933df95d802f01bf1c;hpb=e3f69c1240066b38f96cf54e8c8a3a90f6710202;p=xonotic%2Fxonotic.git diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 0b5cd720..4d2798f0 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -7,8 +7,8 @@ url_http=http://beta.xonotic.org/autobuild-bsp/ url_ssh=xonotic-beta:autobuild-bsp/ build_cachedir="$HOME/xonotic-map-compiler.cache/" screenshot_cachedir="$HOME/xonotic-map-screenshot.cache/" -build_override="-bsp_timeout 1800 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900" -screenshot_override="9 600 +g_ctf 1" +build_override="-bsp_timeout 5400 -vis_timeout 3600 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900" +screenshot_override="9 900 5 +g_ctf 1" getthemap_fail=false @@ -163,7 +163,7 @@ buildthemap() M=$3 blobhash=$4 commithash=$5 - if HEAD "$url$M-$blobhash.pk3"; then + if lwp-request -m HEAD "$url$M-$blobhash.pk3"; then continue fi @@ -213,7 +213,7 @@ screenshotthemap() M=$3 blobhash=$4 commithash=$5 - if HEAD "$url$M-$blobhash/"; then + if lwp-request -m HEAD "$url$M-$blobhash/"; then continue fi @@ -222,35 +222,40 @@ screenshotthemap() continue fi - rm -rf ~/.xonotic + rm -rf ~/.xonotic/data + mkdir -p ~/.xonotic/data ( cd ../.. if [ -n "$DISPLAY" ]; then - misc/tools/xonotic-map-screenshot "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" + misc/tools/xonotic-map-screenshot "$M" $screenshot_override $DRIVERFLAGS +"scr_screenshot_name \"$M-\"" else - #startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -- :8 - #startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -gl_driver /usr/local/lib/gallium3d/libGL.so -- /usr/bin/Xvfb :8 -screen 0 1024x768x24 - startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -- /usr/bin/Xvfb :8 -screen 0 1024x768x24 + case "$DRIVER" in + gl) + startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override $DRIVERFLAGS +"scr_screenshot_name \"$M-\"" -- :8 + ;; + soft|*) + startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"vid_soft 1" $DRIVERFLAGS +"scr_screenshot_name \"$M-\"" -- /usr/bin/Xvfb :8 -screen 0 1024x768x24 + ;; + esac fi - ) - if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then - if [ -n "$IRCSPAM" ]; then - #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$commithash" 1 > "maps/$M.ircss" - ss2spam "$M" "$url?d" "$REFNAME" "$commithash" 1 > "maps/$M.ircss" - fi - return 1 - fi - if [ -n "$IRCSPAM" ]; then - #ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$commithash" 0 > "maps/$M.ircss" - ss2spam "$M" "$url?d" "$REFNAME" "$commithash" 0 > "maps/$M.ircss" + ) 2>&1 | tee ~/.xonotic/data/autoscreenshot.log + good=false + if mv ~/.xonotic/data/screenshots "$M-$blobhash"; then + ss2spam "$M" "$url?d" "$REFNAME" "$commithash" 0 > ~/.xonotic/data/"$M.ircss" + else + mkdir "$M-$blobhash" + ss2spam "$M" "$url?d" "$REFNAME" "$commithash" 1 > ~/.xonotic/data/"$M.ircss" fi + mv ~/.xonotic/data/"$M.ircss" "$M-$blobhash"/ + mv ~/.xonotic/data/autoscreenshot.log "$M-$blobhash"/ chmod 1777 "$M-$blobhash" ln -snf "../$M-$blobhash" "$M" # from ALL branches, so beware! rsync -vaSHP "$M-$blobhash" "$url_ssh" rsync -vaSHP "$M" "$url_ssh""latest/" if [ -n "$IRCSPAM" ]; then - $IRCSPAM < "maps/$M.ircss" + $IRCSPAM < "$M-$blobhash/$M.ircss" fi + return 1 } getthemap() @@ -357,7 +362,7 @@ case "$1" in runmakeindex ;; download) - if ! cd data/xonotic-maps.pk3dir; then + if ! cd data/xonotic-maps.pk3dir >/dev/null 2>&1; then echo "data/xonotic-maps.pk3dir does not exist, not downloading" exit 0 fi