add curl as a backup for wget, needed on OSX
authormerlijn <mhofstra@gmail.com>
Tue, 24 Aug 2010 17:32:59 +0000 (19:32 +0200)
committermerlijn <mhofstra@gmail.com>
Tue, 24 Aug 2010 17:32:59 +0000 (19:32 +0200)
misc/tools/xonotic-map-compiler-autobuild

index c2d7fe6b8b1e625f4279cd968d9e7e232f912519..9e218f8f12f54d34eb264b4bd42e700402131d93 100755 (executable)
@@ -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"