]> gitweb.fluxo.info Git - firma.git/commitdiff
moved AdminHelp near ListAdministration
authorrhatto <rhatto>
Thu, 12 Oct 2006 20:04:52 +0000 (20:04 +0000)
committerrhatto <rhatto>
Thu, 12 Oct 2006 20:04:52 +0000 (20:04 +0000)
firma

diff --git a/firma b/firma
index 1956885694624223c9337369a22f11bb71e05429..1961de3bb13d332f8135ccedf1a44faf5f28056d 100755 (executable)
--- a/firma
+++ b/firma
@@ -34,7 +34,7 @@ GnuPG-based encrypted mailing list manager.
   -a, --admin-task LIST-NAME        process administrative tasks on list
   -c, --create-newlist LIST-NAME    create a new mailing list
   -e, --email-admin-task LIST-NAME  process administrative tasks via email
-  -h, --help                        display this help and exit
+  -h, --help                        display help and exit
   -p, --process-message LIST-NAME   process a message sent to list
   -v, --version                     output version information and exit
 
@@ -1069,6 +1069,31 @@ EOF
 }
 
 
+function AdminHelp {
+  #-------------------------------------------------------------
+  # display help on admin commands
+  #
+  # parameter(s): none
+  # depends on function(s): none
+  # returns: 0 
+  #-------------------------------------------------------------
+
+  # this will be printed to STDOUT, so no indentation here
+  echo "
+  quit                 quit the admin prompt
+  help                 show this help
+  list                 show list subscribers
+  config               list configuration
+  info EMAIL-ADDRESS   show info of a given subscriber
+  sendkey SUBSCRIBER   send list pubkey to subscriber
+  subscribe [..]       subscribe users ('subscribe help' for options)
+  use EMAIL-ADDRESS    use the given address for message delivery instead
+                       of the primary address on key
+  unsub EMAIL-ADDRESS  unsubscribe an email from the list
+"
+}
+
+
 function ListAdministration {
   #-------------------------------------------------------------
   # process administrative tasks
@@ -1084,6 +1109,10 @@ function ListAdministration {
   local -i return_code=0
   local subscribers
 
+  # NOTE: when adding a new admin command, dont forget to
+  #       - add a summary on AdminHelp function
+  #       - if needed, add a "help" option to show more detailed help
+
   case $# in
     1)
       case $1 in
@@ -2020,31 +2049,6 @@ function ConfigHelp {
   SourceListConfig help
 }
 
-
-function AdminHelp {
-  #-------------------------------------------------------------
-  # display help on admin commands
-  #
-  # parameter(s): none
-  # depends on function(s): none
-  # returns: 0 
-  #-------------------------------------------------------------
-
-  # this will be printed to STDOUT, so no indentation here
-  echo "
-  quit                 quit the admin prompt
-  help                 show this help
-  list                 show list subscribers
-  config               list configuration
-  info EMAIL-ADDRESS   show info of a given subscriber
-  sendkey SUBSCRIBER   send list pubkey to subscriber
-  subscribe [..]       subscribe users ('subscribe help' for options)
-  use EMAIL-ADDRESS    use the given address for message delivery instead
-                       of the primary address on key
-  unsub EMAIL-ADDRESS  unsubscribe an email from the list
-"
-}
-
 #-------------------------------------------------------------
 # main()
 #-------------------------------------------------------------