From c59b6bc465b69215d3fa12fd1a50fddaefe4e44d Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Sat, 21 Jan 2023 02:27:24 -0500 Subject: [PATCH] Curl handle redirrects automatically. --- audiogame-manager.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index b76975a..5da72a2 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -284,7 +284,7 @@ download() { fi # Skip if the item is in cache. 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\"..." exit 1 fi @@ -2058,8 +2058,8 @@ case "${game}" in export winVer="win10" install_wine_bottle ie8 vcrun2015 speechsdk # 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 --output "${cache}/Hearthstone_patch.zip" "https://github.com/HearthstoneAccess/HearthstoneAccess/releases/latest/download/patch.zip" + curl -L --output "${cache}/Hearthstone.exe" "https://us.battle.net/download/getInstaller?os=win&installer=Hearthstone-Setup.exe" + curl -L --output "${cache}/Hearthstone_patch.zip" "https://github.com/HearthstoneAccess/HearthstoneAccess/releases/latest/download/patch.zip" wine "${cache}/Hearthstone.exe" /silent unzip -o "${cache}/Hearthstone_patch.zip" -d "${WINEPREFIX}/drive_c/Program Files/Hearthstone" find "${WINEPREFIX}" -type f -name "nvdaControllerClient32.dll" -exec rm -fv "{}" \; @@ -2499,7 +2499,7 @@ EOF install_wine_bottle unzip -d "$WINEPREFIX/drive_c/Program Files/sequence-storm" "${cache}/sequence-storm-win64.zip" 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" ;; "Shades of Doom 1.2") @@ -2629,7 +2629,7 @@ EOF download "https://www.kaldobsky.com/audiogames/Swamp.zip" unzip -d "$WINEPREFIX/drive_c/Program Files/swamp" "${cache}/Swamp.zip" # 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" fi wine 'c:\Program Files\swamp\checkup.exe' /verysilent