A couple changes to update script for Conjury, changed the new source code for importing audiogame-manager to be more in line with coding style of the rest of the code. Also, update script will now correctly source agm no matter from where it is called.

This commit is contained in:
Storm Dragon 2023-12-03 08:16:55 -05:00
parent f85a11b54d
commit a3f84d2db6
2 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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/"