~mil/sxmo-utils

ref: 60dd08fa2724c176485d182e487d115f70987a38 sxmo-utils/scripts/core/sxmo_terminal.sh -rwxr-xr-x 419 bytes
60dd08faStacy Harper Fix sxmo_modemtext in terminal mode 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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