improved help

This commit is contained in:
Michael Hoennig 2024-12-21 15:54:32 +01:00
parent 2ebf4ea618
commit 1bfa404f92

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if [ "$#" -eq 0 ]; then if [ "$#" -eq 0 ] || [ "$1" == "help" ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
cat <<EOF cat <<EOF
curl-wrapper utilizing CAS-authentification for hsadmin-ng" curl-wrapper utilizing CAS-authentification for hsadmin-ng"
usage: $0 [--trace] <<command>> [parameters] usage: $0 [--trace] <<command>> [parameters]
@ -137,7 +137,7 @@ case "$1" in
*) *)
cat >&2 <<EOF cat >&2 <<EOF
unknown command: '$1' unknown command: '$1'
valid commands: login, validate, curl valid commands: help, login, logout, validate, get, post, patch, delete
EOF EOF
exit 1 exit 1
;; ;;