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