aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-02-24 19:05:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-02-24 19:05:44 -0200
commit0d86856e51af59a670cdb96762d74031abb5025b (patch)
tree9171c72396e8b9f6c8ece95e10bb40d17564e7ea /firma
parent92b5e32198846a607154e9c5f1ac59eacab9517a (diff)
downloadfirma-0d86856e51af59a670cdb96762d74031abb5025b.tar.gz
firma-0d86856e51af59a670cdb96762d74031abb5025b.tar.bz2
Fixing config help
Diffstat (limited to 'firma')
-rwxr-xr-xfirma26
1 files changed, 21 insertions, 5 deletions
diff --git a/firma b/firma
index e1c773f..692328f 100755
--- a/firma
+++ b/firma
@@ -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