Closed HirschBerge closed 8 months ago
SteamOS ver: 3.5 Decky Loader Ver: 2.10.4 I'm sure this will make a lot of sense when I know how to use it, but currently, if you don't know how to properly pass a flag provided by a hook to your script, it's "f you, buddy." You'd think it would just have the command, for example,
~/test.sh
and it would add the flags to the end of the command to make it in actuality~/test.sh -i 123123 -h "Game Start" -n "Trails from Zero"
Example contents of
~\test.sh
being#!/usr/bin/env bash while getopts "h:i:n:" opt; do case "$opt" in h) action="$OPTARG" ;; i) steamID="$OPTARG" ;; n) game="$OPTARG" ;; ?) echo "script usage: $(basename $0) [-h Action] [-i Steam ID] [-n Game Name]" >&2 exit 1 ;; esac done shift "$((OPTIND - 1))" current_time=$(date +"%Y-%m-%d %H:%M:%S") echo -en "$current_time\nAction: $action\nSteamID: $steamID\nGame Title: $game\n"> /tmp/test.log
So please add some more use-case-oriented documentation for making use of the hooks.
Edit: Clarity and aggressiveness.
Hmm, you shouldn't need to add the flags manually, so this is a bug
Hmm, you shouldn't need to add the flags manually, so this is a bug
Thanks for the response! just to clarify what I meant, the ~/test.sh -i 123123 -h "Game Start" -n "Trails from Zero"
example I provided is what I would expect to be the command actually passed by the hook, I am not manually putting that info in. The actual command I have for the hook is simply ~/test.sh
. I just concatenated the flags and values onto the end to visualize what I would expect to happen.
Closing, as owner has no intention of creating usable documentation
@HirschBerge did you ever figure out how the flags are being passed when a script it called? I am also not seeing any flags being passed in, when i echo $*
Is that functionality simply broken?
SteamOS ver: 3.5 Decky Loader Ver: 2.10.4 I'm sure this will make a lot of sense when I know how to use it, but currently, if you don't know how to properly pass a flag provided by a hook to your script, it's "f you, buddy." You'd think it would just have the command, for example,
~/test.sh
and it would add the flags to the end of the command to make it in actuality~/test.sh -i 123123 -h "Game Start" -n "Trails from Zero"
Example contents of
~\test.sh
beingSo please add some more use-case-oriented documentation for making use of the hooks.
Edit: Clarity and aggressiveness.