Curl handle redirrects automatically.

This commit is contained in:
stormdragon2976 2023-01-21 02:27:24 -05:00
parent b2e1655246
commit c59b6bc465

View File

@ -284,7 +284,7 @@ download() {
fi fi
# Skip if the item is in cache. # Skip if the item is in cache.
test -e "${cache}/${dest}" && continue test -e "${cache}/${dest}" && continue
if ! curl -4 --output "${cache}/${dest}" "${i}" ; then if ! curl -L4 --output "${cache}/${dest}" "${i}" ; then
echo "Could not download \"$i\"..." echo "Could not download \"$i\"..."
exit 1 exit 1
fi fi
@ -2058,8 +2058,8 @@ case "${game}" in
export winVer="win10" export winVer="win10"
install_wine_bottle ie8 vcrun2015 speechsdk install_wine_bottle ie8 vcrun2015 speechsdk
# This download url breaks the download function, so grab it manually. # This download url breaks the download function, so grab it manually.
curl --output "${cache}/Hearthstone.exe" "https://us.battle.net/download/getInstaller?os=win&installer=Hearthstone-Setup.exe" curl -L --output "${cache}/Hearthstone.exe" "https://us.battle.net/download/getInstaller?os=win&installer=Hearthstone-Setup.exe"
curl --output "${cache}/Hearthstone_patch.zip" "https://github.com/HearthstoneAccess/HearthstoneAccess/releases/latest/download/patch.zip" curl -L --output "${cache}/Hearthstone_patch.zip" "https://github.com/HearthstoneAccess/HearthstoneAccess/releases/latest/download/patch.zip"
wine "${cache}/Hearthstone.exe" /silent wine "${cache}/Hearthstone.exe" /silent
unzip -o "${cache}/Hearthstone_patch.zip" -d "${WINEPREFIX}/drive_c/Program Files/Hearthstone" unzip -o "${cache}/Hearthstone_patch.zip" -d "${WINEPREFIX}/drive_c/Program Files/Hearthstone"
find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \;
@ -2499,7 +2499,7 @@ EOF
install_wine_bottle install_wine_bottle
unzip -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip"
write_sequence_storm_reader write_sequence_storm_reader
curl --output "$WINEPREFIX/drive_c/Program Files/sequence-storm/settings.json" "https://stormgames.wolfe.casa/downloads/sequencestorm-settings.json" curl -L --output "$WINEPREFIX/drive_c/Program Files/sequence-storm/settings.json" "https://stormgames.wolfe.casa/downloads/sequencestorm-settings.json"
add_launcher "c:\Program Files\sequence-storm\SequenceStorm.exe" add_launcher "c:\Program Files\sequence-storm\SequenceStorm.exe"
;; ;;
"Shades of Doom 1.2") "Shades of Doom 1.2")
@ -2629,7 +2629,7 @@ EOF
download "https://www.kaldobsky.com/audiogames/Swamp.zip" download "https://www.kaldobsky.com/audiogames/Swamp.zip"
unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/Swamp.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/Swamp.zip"
# make sure the latest version is installed. # make sure the latest version is installed.
if curl --output "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then if curl -L --output "${cache}/SwampPatch.zip" "https://www.kaldobsky.com/audiogames/SwampPatch.zip" ; then
unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip" unzip -o -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/SwampPatch.zip"
fi fi
wine 'c:\Program Files\swamp\checkup.exe' /verysilent wine 'c:\Program Files\swamp\checkup.exe' /verysilent