]> gitweb.fluxo.info Git - firma.git/commitdiff
new function AdminHelp and Usage update
authorrhatto <rhatto>
Thu, 12 Oct 2006 20:00:57 +0000 (20:00 +0000)
committerrhatto <rhatto>
Thu, 12 Oct 2006 20:00:57 +0000 (20:00 +0000)
firma

diff --git a/firma b/firma
index c6241ff60ca0a478ef72c9230b5f22fbf19aee56..1956885694624223c9337369a22f11bb71e05429 100755 (executable)
--- a/firma
+++ b/firma
@@ -40,11 +40,9 @@ GnuPG-based encrypted mailing list manager.
 
 If option -a is given, read standard input for tasks to be performed.
 Tasks can be one or more of the following:
+`AdminHelp`
 
-  use EMAIL-ADDRESS   use the given address for message delivery instead
-                      of the primary address on key
-
-For help in config file paramaters, type $(basename $0) --help config
+For help in admin and config paramaters, type $(basename $0) --help task-name
 
 Report bugs to <firma@sarava.org>, encrypting the message using the
 public key 0xD68AFEDC available at keyserver.noreply.org."
@@ -1090,19 +1088,7 @@ function ListAdministration {
     1)
       case $1 in
         help)
-          # this will be printed to STDOUT, so no indentation here
-          echo "
-  quit                 quit this 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
-"
+          AdminHelp
           ;;
         quit)
           return_code=3
@@ -2034,6 +2020,31 @@ 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()
 #-------------------------------------------------------------
@@ -2116,7 +2127,8 @@ FUNCTIONS="
   EvalConfigParameter
   SourceFirmaConfig
   SourceListConfig
-  ConfigHelp"
+  ConfigHelp
+  AdminHelp"
 
 for VAR in $GLOBAL_VARS; do
   declare $VAR