Very experimental changes to support running AGM functions, such as get_installer or get_steam, from other scripts. Please report if anything breaks. First script using this functionality, conjury-update, added.
This commit is contained in:
@ -54,6 +54,8 @@ 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
|
||||
trap return INT
|
||||
# url for news file
|
||||
local newsFile="https://stormgames.wolfe.casa/media/agm.ogg"
|
||||
@ -808,6 +810,8 @@ 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
|
||||
mapfile -t lines < <(sed '/^$/d' "${configFile}" 2> /dev/null)
|
||||
if [[ ${#lines} -eq 0 ]]; then
|
||||
echo "Install some games first."
|
||||
@ -3311,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/"
|
||||
;;
|
||||
*)
|
||||
[[ -n "${game}" ]] && echo "Game \"${game}\" not found."
|
||||
exit 1
|
||||
[ "$AGM_NO_LAUNCH" != "yes" ] && [[ -n "${game}" ]] && echo "Game \"${game}\" not found."
|
||||
[ "$AGM_NO_LAUNCH" != "yes" ] && exit 1
|
||||
;;
|
||||
esac
|
||||
winetricks sandbox
|
||||
[ "$AGM_NO_LAUNCH" != "yes" ] && winetricks sandbox
|
||||
|
||||
exit 0
|
||||
[ "$AGM_NO_LAUNCH" != "yes" ] && exit 0
|
||||
|
Reference in New Issue
Block a user