X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler-autobuild;h=d0ef82e22b1409d0a57fac3a16290ecfcdc8f557;hp=a22dceb4a98e3fb78401395253b6e8493752631a;hb=f1c468e0b25928672e07e6c4ade8ee12a791350d;hpb=da509672ee02a2da100cf889a693a794e3ee14ed diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index a22dceb4..d0ef82e2 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -1,8 +1,8 @@ #!/bin/sh -set -ex +set -e -bspdir="$PWD/bspfiles" +bspdir="$PWD/data" url=http://141.2.16.23/~xonotic/bsp-autobuilds/ bspoutdir="$HOME/public_html/bsp-autobuilds/" @@ -33,7 +33,7 @@ buildthemap() fi ( cd maps - ../../../misc/tools/xonotic-map-compiler "$M" -noshaderlist `head -n 1 "$M.map.options"` 2>&1 | tee "$M.log" + ../../../misc/tools/xonotic-map-compiler "$M" `head -n 1 "$M.map.options"` 2>&1 | tee "$M.log" ) zip -9r "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp" "maps/$M.log" "maps/$M/" "maps/$M.lin" "gfx/${M}_mini.tga" ln -snf "../$M-$blobhash.pk3" "$bspdir/latest/$M.pk3" # from ALL branches, so beware! @@ -42,10 +42,11 @@ buildthemap() getthemap() { url=$1 - bspdir=$2 - M=$3 - blobhash=$4 - if [ -f "$bspdir/$M-$blobhash.pk3" ]; then + bspdir_old=$2 + bspdir=$3 + M=$4 + blobhash=$5 + if mv "$bspdir_old/$M-$blobhash.pk3" "$bspdir/$M-$blobhash.pk3"; then continue fi if ! wget -O "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then @@ -74,8 +75,18 @@ case "$1" in git checkout master ;; download) - mkdir -p "$bspdir" + rm -rf "$bspdir.old" + mkdir -p "$bspdir" "$bspdir.old" + mv "$bspdir"/*-????????????????????????????????????????-????????????????????????????????????????.pk3 "$bspdir.old"/ || true cd data/xonotic-maps.pk3dir - allmaps getthemap "$url" "$bspdir" + allmaps getthemap "$url" "$bspdir.old" "$bspdir" + echo "List of maps that got deleted (if any) and currently are in $bspdir.old:" + ls -l "$bspdir.old" + ;; + download-latest) + mkdir -p "$bspdir" + cd "$bspdir" + rm -f *-????????????????????????????????????????-????????????????????????????????????????.pk3 + wget -r -l1 -A "*.pk3" -N --no-parent --no-directories "$url/latest" ;; esac