#!/usr/bin/env bash run_update() { local installPath="${HOME}/.local/games" local arch arch=$(uname -m) local gameName local cache="${HOME}/.cache/lgm" if [[ "$arch" == "aarch64" ]]; then gameName="wicked_quest-linux-aarch64.zip" else gameName="wicked_quest-linux-x86_64.zip" fi # Look for the game file in common download locations for i in ~/Downloads ~/Desktop ; do find $i -type f -name "$gameName" -exec mv -v {} "${cache}/" \; done # If the file is still not available abort. if [[ ! -f "${cache}/$gameName" ]]; then dialog --backtitle "Linux Game Manager" --msgbox "Couldn't find $gameName. Please download the file from https://stormdragon2976.itch.io/wicked-quest and try again." -1 -1 exit 1 fi unzip -od "${installPath}/" "${cache}/$gameName" }