Hopefully better error handling for download errors and missing game files.
This commit is contained in:
parent
0e8a15611a
commit
d67b422a7d
@ -286,7 +286,17 @@ download() {
|
|||||||
# 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 -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then
|
if ! curl -L4 -C - --retry 10 --output "${cache}/${dest}" "${i}" ; then
|
||||||
echo "Could not download \"$i\"..."
|
local exit_code="$?"
|
||||||
|
if [[ $exit_code -eq 22 ]]; then
|
||||||
|
echo "File not found: \"$i\" (HTTP 404)"
|
||||||
|
# Remove the empty file.
|
||||||
|
rm -f "${cache}/${dest}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if file -b "${cache}/${dest}" | grep -q "HTML document" ; then
|
||||||
|
echo "File not found: \"$i\" (HTML document probably 404)"
|
||||||
|
rm -f "${cache}/${dest}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -1749,9 +1759,9 @@ download "https://erion.cf/files/ag_103.zip"
|
|||||||
add_launcher "c:\Program Files\blind-drive\Blind Drive.exe"
|
add_launcher "c:\Program Files\blind-drive\Blind Drive.exe"
|
||||||
;;
|
;;
|
||||||
"Bloodshed")
|
"Bloodshed")
|
||||||
|
download "http://www.samtupy.com/games/bloodshed.exe"
|
||||||
export winVer="win7"
|
export winVer="win7"
|
||||||
install_wine_bottle speechsdk
|
install_wine_bottle speechsdk
|
||||||
download "http://www.samtupy.com/games/bloodshed.exe"
|
|
||||||
cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/"
|
cp "${cache}/bloodshed.exe" "$WINEPREFIX/drive_c/Program Files/"
|
||||||
add_launcher "c:\Program Files\bloodshed.exe"
|
add_launcher "c:\Program Files\bloodshed.exe"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user