Changeset 323


Ignore:
Timestamp:
05/03/2009 16:25:09 (3 years ago)
Author:
ccowart
Message:

Refactored sourcing of the documentation library to support the confadmin
utility. Cleaned up handling of -h for these scripts.

Also set the keywords property on source files that were missing it.

Fixes #20

Location:
trunk
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    • Property svn:keywords set to Id
    r322 r323  
    77dist_pkglibexec_SCRIPTS = conflock abspath 
    88pkgdata_SCRIPTS = confmancommon.sh 
    9 dist_pkgdata_SCRIPTS = confmanlib.sh confmandoc.sh 
     9dist_pkgdata_SCRIPTS = confmanlib.sh confmandoc.sh confadmindoc.sh 
    1010sysconf_DATA = confman.conf.sample 
    1111sysconfdefaults_DATA = confman.conf 
  • trunk/confadmin.8

    • Property svn:keywords set to Id
    r316 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
     
    3333.Sh SYNOPSIS 
    3434.Nm 
    35 .Op Fl h | -help | Cm help 
     35.Op Fl h | Cm help 
    3636.Nm 
    3737.Ar command  
  • trunk/confadmin.in

    • Property svn:keywords set to Id
    r315 r323  
    2525# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2626# 
    27 # $Id: confman.in 308 2009-01-27 07:01:40Z ccowart $ 
     27# $Id$ 
    2828# 
    2929 
     
    3232else 
    3333    echo "Can't find confmancommon.sh. Exiting." >&2 
     34fi 
     35 
     36# Source the documentation library 
     37if [ -f $REPO_DOCS_CONFADMIN ] ; then 
     38        . $REPO_DOCS_CONFADMIN 
     39else 
     40    echo "Couldn't source the confman shell documentation library" >&2 
     41        exit 1 
    3442fi 
    3543 
     
    5563 
    5664# Debug mode? 
    57 while getopts "d" opt ; do 
     65while getopts "hd" opt ; do 
    5866        case $opt in 
    59                 d) 
    60                 DEBUG="true" 
    61                 shift 
    62                 ;; 
    63                 *) 
    64                 print_help 1 
    65                 ;; 
     67                d) DEBUG="true" ;; 
     68        h) shift ; print_help "$@" ; exit 0 ;; 
     69                *) print_usage 1 ;; 
    6670        esac 
    6771done 
  • trunk/confaudit.8

    • Property svn:keywords set to Id
    r321 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
  • trunk/confexport.8

    • Property svn:keywords set to Id
    r321 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
  • trunk/configure.ac

    • Property svn:keywords set to Id
  • trunk/confman.8.in

    • Property svn:keywords set to Id
    r320 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
     
    3333.Sh SYNOPSIS 
    3434.Nm 
    35 .Op Fl h | -help | Cm help 
     35.Op Fl h | Cm help 
    3636.Nm 
    3737.Ar command Oo Ar command_opts Oc Op Ar command_args 
  • trunk/confman.conf.5.in

    • Property svn:keywords set to Id
    r307 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
  • trunk/confman.conf.in

    r317 r323  
    1616 
    1717# The location of our shell's documentation library 
    18 REPO_DOCS="@pkgdatadir@/confmandoc.sh" 
     18REPO_DOCS_CONFMAN="@pkgdatadir@/confmandoc.sh" 
     19REPO_DOCS_CONFADMIN="@pkgdatadir@/confadmindoc.sh" 
    1920 
    2021# The system lockfile 
  • trunk/confman.in

    r319 r323  
    3434else 
    3535    echo "Can't find confmancommon.sh. Exiting." >&2 
     36fi 
     37 
     38# Source the documentation library 
     39if [ -f $REPO_DOCS_CONFMAN ] ; then 
     40        . $REPO_DOCS_CONFMAN 
     41else 
     42    echo "Couldn't source the confman shell documentation library" >&2 
     43        exit 1 
    3644fi 
    3745 
     
    937945 
    938946# Debug mode? 
    939 while getopts "d" opt ; do 
     947while getopts "hd-" opt ; do 
    940948        case $opt in 
    941                 d) 
    942                 DEBUG="true" 
    943                 shift 
    944                 ;; 
    945                 *) 
    946                 print_help 1 
    947                 ;; 
     949                d) DEBUG="true" ;; 
     950        h) shift ; print_help "$@" ; exit 0 ;; 
     951                *) print_usage 1 ;; 
    948952        esac 
    949953done 
  • trunk/confmancommon.sh.in

    r317 r323  
    140140fi 
    141141 
    142 # And the documentation library 
    143 if [ -f $REPO_DOCS ] ; then 
    144         . $REPO_DOCS 
    145 else 
    146     echo "Couldn't source the confman shell documentation library" >&2 
    147         exit 1 
    148 fi 
    149  
    150142# And we'll set a trap: 
    151143trap "conf_cleanExit" SIGINT SIGTERM SIGHUP 
  • trunk/confmandoc.sh

    r313 r323  
    3434 
    3535Usage: 
    36   $MYNAME [ help | -h | --help ] [ command ] 
     36  $MYNAME [ help | -h ] [ command ] 
    3737  $MYNAME setup 
    3838  $MYNAME update 
  • trunk/confsync.8

    • Property svn:keywords set to Id
    r321 r323  
    2323.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2424.\"  
    25 .\" $Id: confman 278 2009-01-18 03:33:03Z ccowart $ 
     25.\" $Id$ 
    2626.\" 
    2727.Dd January 17, 2008 
Note: See TracChangeset for help on using the changeset viewer.