Fix help menu for xwayland-game-wrapper
This commit is contained in:
parent
2c33cdc65f
commit
585f321fdc
@ -15,7 +15,8 @@ function die {
|
|||||||
|
|
||||||
# print_help <argv[0]>
|
# print_help <argv[0]>
|
||||||
function print_help {
|
function print_help {
|
||||||
printf 'usage: %s [OPTIONS...] <GAME> [ARGS...]\n' "${1}"
|
local exec_name="$(basename "${1}")"
|
||||||
|
printf 'usage: %s [OPTIONS...] <GAME> [ARGS...]\n' "${exec_name}"
|
||||||
printf 'Run a game inside an Xwayland session with a window manager. This\n'
|
printf 'Run a game inside an Xwayland session with a window manager. This\n'
|
||||||
printf 'is very similar to gamescope, except that there is a window\n'
|
printf 'is very similar to gamescope, except that there is a window\n'
|
||||||
printf 'involved. The default window manager is OpenBox.\n'
|
printf 'involved. The default window manager is OpenBox.\n'
|
||||||
@ -64,7 +65,7 @@ function get_default_resolution {
|
|||||||
while getopts ':hw:r:d:' OPTOPT; do
|
while getopts ':hw:r:d:' OPTOPT; do
|
||||||
case "${OPTOPT}" in
|
case "${OPTOPT}" in
|
||||||
'h')
|
'h')
|
||||||
print_help "${1}"
|
print_help "${0}"
|
||||||
;;
|
;;
|
||||||
'w')
|
'w')
|
||||||
window_manager="${OPTARG}"
|
window_manager="${OPTARG}"
|
||||||
@ -84,7 +85,7 @@ while getopts ':hw:r:d:' OPTOPT; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
(( "${OPTIND}" > ${#} )) && print_help
|
(( "${OPTIND}" > ${#} )) && print_help "${0}"
|
||||||
shift $(( "${OPTIND}" - 1))
|
shift $(( "${OPTIND}" - 1))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user