X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler-autobuild;h=9e218f8f12f54d34eb264b4bd42e700402131d93;hp=8f3f4aa0539ef84828a91b50378b0cd3bee7ecb2;hb=3dbc51d6d9b3d4b3ff6fd4adb020edf4ad15254a;hpb=0fcb7de675a3251be02a1e8f5542d729af58a467 diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 8f3f4aa0..9e218f8f 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -154,9 +154,11 @@ getthemap() continue fi if ! wget -O "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then - rm -f "$bspdir/$M-$blobhash.pk3" - echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet" - return 0 + if ! curl -o "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then + rm -f "$bspdir/$M-$blobhash.pk3" + echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet" + return 0 + fi fi if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then rm -f "$bspdir/$M-$blobhash.pk3" @@ -173,10 +175,10 @@ case "$1" in git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do git reset --hard git clean -xfd - git checkout "$HASH" + git checkout -f "$HASH" allmaps buildthemap "$REFNAME" "$HASH" "$url" "$bspoutdir" done - git checkout master + git checkout -f master ;; download) mkdir -p "$bspdir" "$bspdir.old"