]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
fix variable use
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index bb4ddb403baf26fb452cfe2ab553bcfd422c32fb..4733758c57d68e019ad98d6a65b02d2dbbdc31db 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 bspdir="$PWD/data"
-url=http://beta.xonotic.org/autobuild-bsp/
+http_url=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/"
@@ -190,16 +190,20 @@ screenshotthemap()
        rm -rf ~/.xonotic
        (
                cd ../..
-               misc/tools/xonotic-map-screenshot "$M" $screenshot_override +"scr_screenshot_name \"$M-\""
+               if [ -n "$DISPLAY" ]; then
+                       misc/tools/xonotic-map-screenshot "$M" $screenshot_override +"scr_screenshot_name \"$M-\""
+               else
+                       startx "$PWD/misc/tools/xonotic-map-screenshot" "$M" $screenshot_override +"scr_screenshot_name \"$M-\"" -- :8
+               fi
        )
        if ! mv ~/.xonotic/data/screenshots "$M-$blobhash"; then
                if [ -n "$IRCSPAM" ]; then
-                       ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" > "maps/$M.ircss"
+                       ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" > "maps/$M.ircss"
                fi
                return 1
        fi
        if [ -n "$IRCSPAM" ]; then
-               ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" > "maps/$M.ircss"
+               ss2spam "$M" "$url$M-$blobhash/" "$REFNAME" "$HASH" > "maps/$M.ircss"
        fi
        ln -snf "../$M-$blobhash" "$M" # from ALL branches, so beware!
        rsync -vaSHP "$M-$blobhash" "$url_ssh"
@@ -245,7 +249,7 @@ case "$1" in
                        git reset --hard
                        git clean -xfd
                        git checkout -f "$HASH"
-                       allmaps buildthemap "$REFNAME" "$HASH" "$url"
+                       allmaps buildthemap "$REFNAME" "$HASH" "$http_url"
                        touch "$build_cachedir/$HASH"
                done
                git checkout -f master
@@ -259,9 +263,9 @@ case "$1" in
                        git reset --hard
                        git clean -xfd
                        git checkout -f "$HASH"
-                       allmaps getthemap "$url" "$bspdir.old" "$bspdir"
+                       allmaps getthemap "$http_url" "$bspdir.old" "$bspdir"
                        if ! $getthemap_fail; then
-                               allmaps screenshotthemap "$REFNAME" "$HASH" "$url"
+                               allmaps screenshotthemap "$REFNAME" "$HASH" "$http_url"
                                touch "$screenshot_cachedir/$HASH"
                        fi
                done
@@ -275,7 +279,7 @@ case "$1" in
                        fi
                done
                cd data/xonotic-maps.pk3dir
-               allmaps getthemap "$url" "$bspdir.old" "$bspdir"
+               allmaps getthemap "$http_url" "$bspdir.old" "$bspdir"
                echo "List of maps that got deleted (if any) and currently are in $bspdir.old:"
                ls -l "$bspdir.old"
                ;;
@@ -283,7 +287,7 @@ case "$1" in
                mkdir -p "$bspdir"
                cd "$bspdir"
                rm -f *-????????????????????????????????????????-????????????????????????????????????????.pk3
-               wget -r -l1 -A "*.pk3" -N --no-parent --no-directories "$url""latest"
+               wget -r -l1 -A "*.pk3" -N --no-parent --no-directories "$http_url""latest"
                ;;
        log2spam-test)
                log2spam "mapname" "http://mapurl" "branch" "commit" "0"