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"
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"