diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 0db2225..952cdfe 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -55,7 +55,7 @@ alert() { # Check for latest news check_news() { # For use by update scripts that want to source functions in this file. - [ "$AGM_NO_LAUNCH" == "yes" ] && return + [[ "$agmNoLaunch" == "true" ]] && return trap return INT # url for news file local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" @@ -811,7 +811,7 @@ kill_game() { # launch games that are installed game_launcher() { # For use by update scripts that want to source functions in this file. - [ "$AGM_NO_LAUNCH" == "yes" ] && return + [[ "$agmNoLaunch" == "true" ]] && return mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null) if [[ ${#lines} -eq 0 ]]; then echo "Install some games first." @@ -3315,10 +3315,10 @@ export norh=false # Must install a voice, and rhvoice works easily with 64 bit. open_url "https://2mb.games/product/2mb-patron/" ;; *) - [ "$AGM_NO_LAUNCH" != "yes" ] && [[ -n "${game}" ]] && echo "Game \"${game}\" not found." - [ "$AGM_NO_LAUNCH" != "yes" ] && exit 1 + [[ "$agmNoLaunch" != "true" ]] && [[ -n "${game}" ]] && echo "Game \"${game}\" not found." + [[ "$agmNoLaunch" != "true" ]] && exit 1 ;; esac -[ "$AGM_NO_LAUNCH" != "yes" ] && winetricks sandbox +[[ "$agmNoLaunch" != "true" ]] && winetricks sandbox -[ "$AGM_NO_LAUNCH" != "yes" ] && exit 0 +[[ "$agmNoLaunch" != "true" ]] && exit 0 diff --git a/game-scripts/conjury-update.sh b/game-scripts/conjury-update.sh index c153260..a5d86db 100755 --- a/game-scripts/conjury-update.sh +++ b/game-scripts/conjury-update.sh @@ -38,11 +38,15 @@ # or portions thereof with code not governed by the terms of the CPAL. # Provisional new functionality to be able to source functions from agm: -export AGM_NO_LAUNCH=yes -source audiogame-manager.sh +export agmNoLaunch="true" +sourcePath="$(readlink -f "$0")" +sourcePath="${sourcePath%/*/*.sh}/audiogame-manager.sh" +source "${sourcePath}" + # All functions should be available at this point. export game="Conjury" export WINEPREFIX="$HOME/.local/wine/conjury" + # Now it should be as simple as running get_steam to redownload the game. get_steam 2684520 "https://store.steampowered.com/app/2684520/Conjury/"