]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
remove relative paths
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 02e11b2fd006abd9f4c1938de6d11428a7b5c434..8ab0f443ac234229a0073d369b862dee4af25a67 100755 (executable)
@@ -172,22 +172,16 @@ buildthemap()
        git checkout -f "$commithash"
 
        if [ -n "$IRCSPAM" ]; then
-               pre2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$commithash" | $IRCSPAM
+               pre2spam "$M" "$url$M-$blobhash.pk3" "$REFNAME" "$commithash" | $IRCSPAM || true
        fi
        t0=`date +%s`
        (
-               cd maps
-               sz=`grep '^size ' "$M.mapinfo" 2>/dev/null || true`
-               if [ -n "$sz" ]; then
-                       minimap_override="-minimap + -minmax ${sz#size }"
-               else
-                       minimap_override=
-               fi
-               ../../../misc/tools/xonotic-map-compiler "$M" `grep ^- "$M.map.options" | cut -d '#' -f 1` $minimap_override $build_override > "$M.log" 2>&1
+               cd ../..
+               misc/tools/xonotic-map-compiler-optionsfile "data/xonotic-maps.pk3dir/maps/$M" $build_override > "data/xonotic-maps.pk3dir/maps/$M.log" 2>&1
        )
        status=$?
        if ! [ -f "maps/$M.bsp" ]; then
-               echo >>"$M.log" "ERROR: No BSP file"
+               echo >>"maps/$M.log" "ERROR: No BSP file"
        fi
        t1=`date +%s`
        dt=$(($t1 - $t0))
@@ -202,7 +196,10 @@ buildthemap()
        rsync -vaSHP "$M-$blobhash.pk3" "$M-full-$blobhash.pk3" "$url_ssh"
        rsync -vaSHP "$M.pk3" "$M-full.pk3" "$url_ssh""latest/"
        if [ -n "$IRCSPAM" ]; then
-               $IRCSPAM < "maps/$M.irc"
+               $IRCSPAM < "maps/$M.irc" || true
+       fi
+       if [ -n "$BUILD_ONE" ]; then
+               exit
        fi
 }
 
@@ -253,7 +250,10 @@ screenshotthemap()
        rsync -vaSHP "$M-$blobhash" "$url_ssh"
        rsync -vaSHP "$M" "$url_ssh""latest/"
        if [ -n "$IRCSPAM" ]; then
-               $IRCSPAM < "$M-$blobhash/$M.ircss"
+               $IRCSPAM < "$M-$blobhash/$M.ircss" || true
+       fi
+       if [ -n "$BUILD_ONE" ]; then
+               exit
        fi
 }
 
@@ -361,6 +361,10 @@ case "$1" in
                runmakeindex
                ;;
        download)
+               if ! which unzip >/dev/null 2>&1; then
+                       echo "Cannot find unzip, bailing out"
+                       exit 1
+               fi
                if ! cd data/xonotic-maps.pk3dir >/dev/null 2>&1; then
                        echo "data/xonotic-maps.pk3dir does not exist, not downloading"
                        exit 0