From 26e8408b927cda14fe6d52fd842f8532cfc83bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 12 Jan 2024 12:17:17 +0100 Subject: [PATCH] tools/toolbox: Consistently handle option parsing failures `getopt` already prints a message on parse errors, but it still seems like good style to point to --help as we do elsewhere. Part-of: --- tools/toolbox/create-toolbox.sh | 2 +- tools/toolbox/meson-build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/toolbox/create-toolbox.sh b/tools/toolbox/create-toolbox.sh index ba240c537..5c06021e0 100755 --- a/tools/toolbox/create-toolbox.sh +++ b/tools/toolbox/create-toolbox.sh @@ -96,7 +96,7 @@ TEMP=$(getopt \ --longoptions 'skip-mutter' \ --longoptions 'set-default' \ --longoptions 'help' \ - -- "$@") + -- "$@") || die "Run $(basename $0) --help to see available options" eval set -- "$TEMP" unset TEMP diff --git a/tools/toolbox/meson-build.sh b/tools/toolbox/meson-build.sh index 0f5923bb8..82234f119 100755 --- a/tools/toolbox/meson-build.sh +++ b/tools/toolbox/meson-build.sh @@ -50,7 +50,7 @@ TEMP=$(getopt \ --longoptions 'toolbox:' \ --longoptions 'dist' \ --longoptions 'help' \ - -- "$@") + -- "$@") || die "Run $(basename $0) --help to see available options" eval set -- "$TEMP" unset TEMP