mirror of
https://github.com/ben-grande/qusal.git
synced 2025-11-27 18:01:01 -05:00
27 lines
518 B
Bash
Executable file
27 lines
518 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# SPDX-FileCopyrightText: 2017 - 2023 Rusty Bird <rustybird@net-c.com>
|
|
#
|
|
# SPDX-License-Identifier: 0BSD
|
|
|
|
set -eu
|
|
|
|
usage(){
|
|
eof="$(stty -a | sed -n 's/.*eof = \([^;]*\);.*/\1/p')"
|
|
printf '%s\n' "Usage: ${0##*/} [QVM-RUN_OPTIONS] <QUBE>
|
|
Quit: ${eof}" >&2
|
|
exit 1
|
|
}
|
|
|
|
case "${1-}" in
|
|
""|-h|-?-help) usage;;
|
|
*) ;;
|
|
esac
|
|
|
|
if test -t 0; then
|
|
stty_bak="$(stty -g)"
|
|
trap 'stty ${stty_bak}' EXIT
|
|
stty -echo -icanon intr ""
|
|
fi
|
|
|
|
qvm-run --pass-io "${@}" -- 'LC_CTYPE=C script --quiet --return /dev/null'
|