#!/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" else agm_msgbox "Nothing to do; your game is up to date." fi