diff options
Diffstat (limited to 'firma')
-rwxr-xr-x | firma | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -2537,22 +2537,22 @@ case "$NUM_OF_ARGS" in case "$OPTION" in # valid short option - -a|-c|-e|-p) + -a|-c|-e|-p|-h) ;; # valid long option - --admin-task|--create-newlist|--email-admin-task|--process-message) + --admin-task|--create-newlist|--email-admin-task|--process-message|--help) ;; # valid short option called with too many arguments - -h|-v) + -v) echo >&2 "$BASENAME: too many arguments -- $@" Usage EXIT_CODE=1 ;; # valid long option called with too many arguments - -help|-version) + --version) echo >&2 "$BASENAME: too many arguments -- $@" Usage EXIT_CODE=1 @@ -2616,8 +2616,24 @@ if [[ "$EXIT_CODE" == "0" ]]; then esac ;; 2) + # help options + if [ "$OPTION" == "--help" ] || [ "$OPTION" == "-h" ]; then + + if [ "$ARG" == "config" ]; then + + ConfigHelp + EXIT_CODE=0 + + else + + echo >&2 "$BASENAME: invalid help section -- $ARG" + Usage + EXIT_CODE=1 + + fi + # if firma.conf exists and can be read - if [[ ! -r "$FIRMA_CONFIG_FILE" ]]; then + elif [[ ! -r "$FIRMA_CONFIG_FILE" ]]; then LogMessage "FATAL: Cannot source \`$FIRMA_CONFIG_FILE': No such file or directory" EXIT_CODE=1 |