diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-02-24 19:05:44 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-02-24 19:05:44 -0200 |
commit | 0d86856e51af59a670cdb96762d74031abb5025b (patch) | |
tree | 9171c72396e8b9f6c8ece95e10bb40d17564e7ea /firma | |
parent | 92b5e32198846a607154e9c5f1ac59eacab9517a (diff) | |
download | firma-0d86856e51af59a670cdb96762d74031abb5025b.tar.gz firma-0d86856e51af59a670cdb96762d74031abb5025b.tar.bz2 |
Fixing config help
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 |