From 8e5880eb959ac08f67a16ba68ab2ef118c0447c7 Mon Sep 17 00:00:00 2001 From: olf Date: Sat, 12 Aug 2023 16:51:37 +0200 Subject: [PATCH] =?UTF-8?q?[patchmanager-tool]=20Alter=20option=20`-h`=20t?= =?UTF-8?q?o=20`-=3F`,=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … because this is more common (especially the pair `-?` and `--help` as synonyms) and it frees `-h` for something else (often "human readable", though currently I cannot see how this might be applicable here). --- src/tools/patchmanager-tool | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/patchmanager-tool b/src/tools/patchmanager-tool index 35c1236f..d7993161 100644 --- a/src/tools/patchmanager-tool +++ b/src/tools/patchmanager-tool @@ -11,21 +11,21 @@ called="$(basename $0)" function surplus() { if [ -n "$*" ]; then printf 'Too many parameters: %s\n' "$*" >&2 - printf 'Call "%s -h" for a help page.\n' "$called" >&2 + printf 'Call "%s -?" for a help page.\n' "$called" >&2 exit 1 fi } function usage() { printf "Patchmanager tool is a front-end for the patchmanager executable.\n" - printf "USAGE: %s [-a|-A|-d|-D|-e|-h] [|-f ]\n" "$called" + printf "USAGE: %s [-a|-A|-d|-D|-e|-?] [|-f ]\n" "$called" printf "\t-a | --activate\t\t\tActivate / apply Patches from list or file (via -f).\n" printf "\t-A | --activate-all\t\tActivate / apply all Patches formerly marked as active.\n" printf "\t-d | --deactivate\t\tDeactivate / unapply Patches from list or file (via -f).\n" printf "\t-D | --deactivate-all\t\tDeactivate / unapply all Patches.\n" printf "\t-f | --file \t\tUse for the list of Patches.\n" printf "\t-e | --export\t\t\tExport list of Patches marked as active either to STDout or (via -f) to a file.\n" - printf "\t-h | --help\t\t\tPrint this help.\n" + printf "\t-? | --help\t\t\tPrint this help.\n" printf "* The must be comprised of (internal) names of Patches, separated by white-spaces, commas or both.\n" printf "* For writing to , it must not already exist and must be in a writable directory.\n" printf "* For reading from , it must be a plain text file containing the (internal) names of Patches, separated by white-spaces, commas or both.\n" @@ -126,20 +126,20 @@ case "$1" in exit 0 fi ;; - -h|--help) + -\?|--help) usage exit 0 ;; *) printf 'Missing or wrong parameters!\n' >&2 - printf 'Call "%s -h" for a help page.\n' "$called" >&2 + printf 'Call "%s -?" for a help page.\n' "$called" >&2 exit 1 ;; esac if [ -z "$patchlist" ] || printf %s "$patchlist" | grep -q '[$&();<>|]'; then printf 'Patchlist is empty or contains illegal characters!\n' >&2 - printf 'Call "%s -h" for a help page.\n' "$called" >&2 + printf 'Call "%s -?" for a help page.\n' "$called" >&2 exit 1 fi