Author: manx
Date: Wed Jun 5 15:40:52 2024
New Revision: 20926
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20926
Log:
[Fix] build: download_externals.sh: Automatically follow HTTP redirects.
[Imp] build: download_externals.sh: Handle spaces in URLs.
Modified:
trunk/OpenMPT/build/download_externals.sh
Modified: trunk/OpenMPT/build/download_externals.sh
==============================================================================
--- trunk/OpenMPT/build/download_externals.sh Wed Jun 5 14:56:17 2024 (r20925)
+++ trunk/OpenMPT/build/download_externals.sh Wed Jun 5 15:40:52 2024 (r20926)
@@ -31,10 +31,10 @@
fi
fi
while (( "$#" )); do
- URL="$1"
+ URL="$(echo ""$1"" | sed 's/ /%20/g')"
if [ ! -f "$MPT_GET_FILE_NAME" ]; then
echo "Downloading '$MPT_GET_FILE_NAME' from '$URL' ..."
- curl -o "$MPT_GET_FILE_NAME" "$URL"
+ curl --location -o "$MPT_GET_FILE_NAME" "$URL"
echo "Verifying '$URL' ..."
if [ -f "$MPT_GET_FILE_NAME" ]; then
FILE_SIZE=$(find "$MPT_GET_FILE_NAME" -printf '%s')
|