questions about runcommand.sh
-
There is - processing order needs to change - I will implement it.
-
the PR didn't actually work btw - it would try and launch a script with the parameters as the name of the script. You would need to do
bash "$configdir/all/runcommand-onstart.sh" "$@"
notbash "$configdir/all/runcommand-onstart.sh $@"
-
-
@BuZz Really cool man! Thanks!
-
Another runcommand question:
Why
runcommand.log
went to/dev/shm
? -
ram based.
-
@BuZz
one more question...Premise: thinking in RetroArch only.
I'm using
runcommand-onstart.sh
to change a system specific'sretroarch.cfg
before launching the game. Is the$system
passed toruncommand-onstart.sh
a valid configdir?In other words, can I use
/opt/retropie/configs/$system/retroarch.cfg
?I'm doing this way and it's working fine for the classic consoles (atari2600, nes, snes, megadrive, etc...). But I'm worried if this will work for any libretro emulator.
-
-
@BuZz
(* sigh * here I go bother you again...)would you mind to
export
thelog
variable inruncommand.sh
?reason:
make it accessible inruncommand-on{start,end}.sh
.use case:
Since users can execute custom commands inruncommand-on{start,end}.sh
some bugs can be inserted.
It would be a good practice for those who want to write something in these scripts, to log some info for bug tracking.
Another benefit: It helps us to help inexperienced users with problems because of third-partyon{start,end}
scripts. -
Just write your own log or use the same filename. Actually, I will redirect stderr to the log, so errors will get logged automatically.
-
@BuZz
Oh! You did it!
I'll redirect log messages to stderr. Thanks again! -
@BuZz
Don't you think that would be useful to register the start/end of theruncommand-on{start,end}.sh
?The goal is to facilitate problem diagnosis in
runcommand.log
. Example: If some user has problems on launching a game because of a badruncommand-onstart.sh
and don't know it, he can paste his runcommand.log and this info would help the diagnose.I was thinking in something like this:
# calls script with parameters system, emulator, rom, and commandline function user_script() { local script="$configdir/all/$1" if [[ -f "$script" ]]; then echo "--- start of \"$script\" ---" >> "$log" bash "$script" "$system" "$emulator" "$rom" "$command" </dev/tty 2>>"$log" echo "--- end of \"$script\" ---" >> "$log" fi }
[EDIT: I know we can register this info using the script itself, but not everyone follows this good practice.]
-
@meleu I don't. Runcommand will continue even if there is an error. Please try to not constantly send me questions and requests.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.