As we rely on the terminal name to use the contextual menu, we used the st target directly, preventing to use the taillog command in terminal mode. Add an optional TERMNAME env variable to manage this smoothly. Signed-off-by: Stacy Harper <contact@stacyharper.net> Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
21 lines
419 B
Bash
Executable file
21 lines
419 B
Bash
Executable file
#!/usr/bin/env sh
|
|
# shellcheck disable=SC2086
|
|
|
|
if [ -n "$TERMNAME" ]; then
|
|
case "$TERMCMD" in
|
|
"st -e")
|
|
set -- st -T "$TERMNAME" -e "$@"
|
|
;;
|
|
*)
|
|
printf "%s: '%s'\n" "Not implemented for TERMCMD" "$TERMCMD" >&2
|
|
set -- $TERMCMD "$@"
|
|
esac
|
|
else
|
|
set -- $TERMCMD "$@"
|
|
fi
|
|
|
|
if [ -z "$*" ]; then
|
|
echo "sxmo_terminal.sh called in TERMMODE without any arguments (returning, nothing to do)" >&2
|
|
else
|
|
exec "$@"
|
|
fi
|