From e706684ed2c377e7efcd2d02a362ca6cec136dd5 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 16 Jun 2024 04:37:29 +0100 Subject: [PATCH] store skip commands in variable --- steamtinkerlaunch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 528b8e4a..2784a9f3 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240617-2 (fix-gamelaunch-steamappscommon)" +PROGVERS="v14.0.20240617-3 (fix-gamelaunch-steamappscommon)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -26852,11 +26852,15 @@ function main { fi fi elif grep -q "$SAC" <<< "$@" || grep -q "$L2EA" <<< "$@"; then + # We check if incoming commands contain 'steamapps/common' to interpret them as game launch commands + # But if $1 is a known command in this list, explicitly pass it to 'commandline' as we know it is NOT a game command + STLINCOMINGSKIPCOMMANDS="otr|onetimerun" + if grep -q "update" <<< "$@" || grep -q "^play" <<< "$@" ; then commandline "$@" # HACK: Since we check for steamapps/common ($SAC), commands which contain this (such as a one-time run path) will incorrectly get triggered as a game launch # As a workaround, skip a hardcoded set of commands and pass directly to commandline (i.e. if we have OTR as our first option, pass down to commandline function and run otr) - elif grep -qwE "otr|onetimerun" <<< "${1}"; then + elif grep -qwE "${STLINCOMINGSKIPCOMMANDS}" <<< "${1}"; then commandline "$@" else setGameVars "$@"