~mil/sxmo-utils

ref: a3e4dc0fa47d4b73bf2c3d0f138e253abdbe982c sxmo-utils/scripts/core/sxmo_terminal.sh -rwxr-xr-x 223 bytes
a3e4dc0fStacy Harper Make all sxmo menu SSH mode compatible 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
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 "$@"