~mil/sxmo-utils

eb34a970cbc21eb86997ebf7b4fea75b03d6240e — Maarten van Gompel 6 months ago 0b79710
TERMMODE was used but not set in sxmo_modemtext.sh + sanity check for sxmo_terminal

(fixed the shellcheck problem)

Signed-off-by: Stacy Harper <contact@stacyharper.net>
2 files changed, 7 insertions(+), 1 deletions(-)

M scripts/core/sxmo_terminal.sh
M scripts/modem/sxmo_modemtext.sh
M scripts/core/sxmo_terminal.sh => scripts/core/sxmo_terminal.sh +5 -1
@@ 11,4 11,8 @@ else
	set -- st "$@"
fi

exec "$@"
if [ -z "$*" ]; then
	echo "sxmo_terminal.sh called in TERMMODE without any arguments (returning, nothing to do)" >&2
else
	exec "$@"
fi

M scripts/modem/sxmo_modemtext.sh => scripts/modem/sxmo_modemtext.sh +2 -0
@@ 4,6 4,8 @@
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"

TERMMODE=$([ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "true")

err() {
	echo "$1">&2
	echo "$1" | dmenu -c -l 10