Make all sxmo menu SSH mode compatible

We then simplify the sxmo_modemtext that was already using SSH related
behaviors.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper
2021-04-05 12:45:01 +02:00
committed by Maarten van Gompel
parent 33e6ce14b3
commit a3e4dc0fa4
6 changed files with 41 additions and 21 deletions

14
scripts/core/sxmo_terminal.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
TERMMODE=$([ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "true")
if [ "$TERMMODE" = "true" ]; then
while [ "-e" != "$1" ] || [ 0 -eq $# ]; do
shift
done
shift
else
set -- st "$@"
fi
exec "$@"