Updater for AudioDefence added. Game updated to latest version.
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
declare -Ag ipfs=(
|
declare -Ag ipfs=(
|
||||||
# Games (alphabetical order)
|
# Games (alphabetical order)
|
||||||
[Audio_Defence_aarch64]="${ipfsGateway}/ipfs/QmNN39dhssJBVsN3qXM7LKiy5bP2nUFWruksKy3RAvAz4e?filename=AudioDefence-26.09.20-3-aarch64.AppImage"
|
[Audio_Defence_aarch64]="${ipfsGateway}/ipfs/QmNdnfvLqJXDSvQiUjAsKt3y2yNjYoZEGQ8NffaBmhTeVd?filename=AudioDefence-26.09.22-1-aarch64.AppImage"
|
||||||
[Audio_Defence_x86_64]="${ipfsGateway}/ipfs/QmaH6eQaoPXBDh4GDhXBZiNH6NXaduGta9suQdPwkpfffx?filename=AudioDefence-26.09.20-3-x86_64.AppImage"
|
[Audio_Defence_x86_64]="${ipfsGateway}/ipfs/QmVKGMFPsAzb3SRvFKSX5b5e45ngj4wobKUk7kaeAam3Sn?filename=AudioDefence-26.09.22-1-x86_64.AppImage"
|
||||||
[FreeDoom]="${ipfsGateway}/ipfs/QmU6REFot8CGVSBy2YWQxnmXoh7M4EF74RxFtLzvtJxoGC?filename=toby_doom_9.0_full.zip"
|
[FreeDoom]="${ipfsGateway}/ipfs/QmU6REFot8CGVSBy2YWQxnmXoh7M4EF74RxFtLzvtJxoGC?filename=toby_doom_9.0_full.zip"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,21 +1,10 @@
|
|||||||
# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh
|
# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh
|
||||||
check_architecture x86_64 aarch64
|
check_architecture x86_64 aarch64
|
||||||
case "$(uname -m)" in
|
audioDefenceUrl="${ipfs[Audio_Defence_$(uname -m)]}"
|
||||||
x86_64)
|
downloadFile="${audioDefenceUrl##*filename=}"
|
||||||
appImageFile="AudioDefence-26.09.20-3-x86_64.AppImage"
|
downloadFile="${downloadFile%%&*}"
|
||||||
expectedHash="8ac007d2c2ea29cd2c84d22d892d1e92f236b456a3667f66919a837f023040cf"
|
[[ -n "${downloadFile}" && "${downloadFile}" != "${audioDefenceUrl}" ]] || downloadFile="AudioDefence-$(uname -m).AppImage"
|
||||||
;;
|
download_named "${downloadFile}" "${audioDefenceUrl}"
|
||||||
aarch64)
|
|
||||||
appImageFile="AudioDefence-26.09.20-3-aarch64.AppImage"
|
|
||||||
expectedHash="2b3c5efeda51f1be5a9389d05a4a29ca7f92d39b20c8017f1ca0d492c69cf850"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
download_named "${appImageFile}" "${ipfs[Audio_Defence_$(uname -m)]}"
|
|
||||||
if ! printf '%s %s\n' "${expectedHash}" "${cache}/${appImageFile}" | sha256sum --check --strict; then
|
|
||||||
rm -f "${cache}/${appImageFile}"
|
|
||||||
ui_msgbox "Linux Game Manager" "Linux Game Manager" "The Audio Defence download failed its SHA-256 verification. Please try again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
mkdir -p "${installPath}/Audio_Defence"
|
mkdir -p "${installPath}/Audio_Defence"
|
||||||
cp -v "${cache}/${appImageFile}" "${installPath}/Audio_Defence/${appImageFile}"
|
install -v -m 0755 "${cache}/${downloadFile}" "${installPath}/Audio_Defence/AudioDefence.AppImage"
|
||||||
chmod +x "${installPath}/Audio_Defence/${appImageFile}"
|
find "${installPath}/Audio_Defence" -maxdepth 1 -type f -name 'AudioDefence-*.AppImage' -delete
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh
|
# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh
|
||||||
gamePath="${installPath}/Audio_Defence"
|
gamePath="${installPath}/Audio_Defence"
|
||||||
case "$(uname -m)" in
|
run_with_optional_gamemode "${gamePath}/AudioDefence.AppImage"
|
||||||
aarch64)
|
|
||||||
appImageFile="AudioDefence-26.09.20-3-aarch64.AppImage"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
appImageFile="AudioDefence-26.09.20-3-x86_64.AppImage"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
run_with_optional_gamemode "${gamePath}/${appImageFile}"
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# shellcheck shell=bash disable=SC2154 # Variables are set by linux-game-manager.sh
|
||||||
|
run_update() {
|
||||||
|
check_architecture x86_64 aarch64
|
||||||
|
local audioDefenceUrl="${ipfs[Audio_Defence_$(uname -m)]}"
|
||||||
|
local downloadFile="${audioDefenceUrl##*filename=}"
|
||||||
|
downloadFile="${downloadFile%%&*}"
|
||||||
|
[[ -n "${downloadFile}" && "${downloadFile}" != "${audioDefenceUrl}" ]] || \
|
||||||
|
downloadFile="AudioDefence-$(uname -m).AppImage"
|
||||||
|
|
||||||
|
# download_named reads this dynamically scoped flag.
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local redownload=true
|
||||||
|
download_named "${downloadFile}" "${audioDefenceUrl}"
|
||||||
|
|
||||||
|
local gamePath="${installPath}/Audio_Defence"
|
||||||
|
mkdir -p "${gamePath}"
|
||||||
|
install -v -m 0755 "${cache}/${downloadFile}" "${gamePath}/AudioDefence.AppImage.new"
|
||||||
|
mv -v "${gamePath}/AudioDefence.AppImage.new" "${gamePath}/AudioDefence.AppImage"
|
||||||
|
find "${gamePath}" -maxdepth 1 -type f -name 'AudioDefence-*.AppImage' -delete
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user