diff --git a/game-scripts/update-swamp2.sh b/game-scripts/update-swamp2.sh new file mode 100755 index 0000000..dfe4006 --- /dev/null +++ b/game-scripts/update-swamp2.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Updater script for Swamp 2. +# For whatever reason, the updates are partially applied and I'm too lazy to figure out why Wine is barfing, so we'll just do it manually. +cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager" +. ../.includes/dialog-interface.sh +. ../.includes/functions.sh +swamphouse=~/.local/wine64/drive_c/Program\ Files/swamp2 +myver=$(cat "$swamphouse/myversion.txt") +newver=$(curl -s https://kaldobsky.com/audiogames/swamp2version.txt) +if [[ $newver -gt $myver ]]; then + agm_msgbox "Our version: ${myver}, with the newer version being ${newver}" + download "https://kaldobsky.com/audiogames/swamp2_update.zip" + install_with_progress unzip "Extracting game files..." -d "${swamphouse}" "${cache}/swamp2_update.zip" + rm "${cache}/swamp2_update.zip" +fi