From eb2d5d4fe4f685fd46b75488458b2fc31c40bf86 Mon Sep 17 00:00:00 2001 From: Yxq <3023209091@tju.edu.cn> Date: Mon, 19 Oct 2026 19:41:11 +0800 Subject: [PATCH] dist: let gen-spec.sh answer -h/--help gen-spec.sh has a usage() function (printed on its own line 7) but its option loop has no branch for help, so '-h' and '--help' fall into the catch-all and die with 'Unrecognized parameter --help'. Since the script already knows how to describe itself, answering the help request is a one-branch addition: -h | --help ) usage; exit 0 ;; No behaviour of any existing option changes. Signed-off-by: Yxq <3023209091@tju.edu.cn> --- dist/scripts/gen-spec.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/scripts/gen-spec.sh b/dist/scripts/gen-spec.sh index 2c264ce3dc4d..7c315e89e31e 100755 --- a/dist/scripts/gen-spec.sh +++ b/dist/scripts/gen-spec.sh @@ -76,6 +76,10 @@ while [[ $# -gt 0 ]]; do done shift 2 ;; + -h | --help ) + usage + exit 0 + ;; * ) die "Unrecognized parameter $1" ;; -- Gitee