auto start X server when needed
authorRudolf Polzer <divVerent@xonotic.org>
Wed, 29 Sep 2010 13:17:08 +0000 (15:17 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 29 Sep 2010 13:17:08 +0000 (15:17 +0200)
misc/tools/xonotic-map-compiler-autobuild

index 9a5be4eb803285007f6cfee5ec9f533977c04a05..c2bee5ba87ce08041088118afcc5b28319dd03ee 100755 (executable)
@@ -190,7 +190,11 @@ 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