Changeset 321


Ignore:
Timestamp:
05/02/2009 21:07:15 (3 years ago)
Author:
ccowart
Message:

Usage statements and -h support for all scripts.

Fixes #21

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/confaudit.8

    r290 r321  
    3434.Nm 
    3535.Op Fl q 
     36.Nm 
     37.Fl h 
    3638.Sh DESCRIPTION 
    3739The 
     
    4951will report only whether files differ and not the actual differences (See 
    5052.Xr diff 1) . 
     53.Fl h  
     54will cause 
     55.Nm to display the usage statement and exit. 
    5156.Pp 
    5257.Nm 
  • trunk/confaudit.in

    r302 r321  
    3434fi 
    3535 
     36function print_help { 
     37    echo "usage: $0 [-q]" >&4 
     38    exit ${1:-0} 
     39} 
     40 
    3641quiet=false 
    37 while getopts "q" opt ; do 
     42while getopts "qh" opt 2>&4 ; do 
    3843    case $opt in  
    39         q) 
    40         quiet=true 
    41         shift 
    42         ;; 
    43         *) 
    44         ;; 
     44        q) quiet=true ;; 
     45        h) print_help 0 ;; 
     46        *) print_help 1 ;; 
    4547    esac 
    4648done 
  • trunk/confexport.8

    r288 r321  
    3333.Sh SYNOPSIS 
    3434.Nm 
     35.Nm 
     36.Fl h 
    3537.Sh DESCRIPTION 
    3638The 
     
    4244repository for use by hosts running 
    4345.Xr confsync 8 . 
     46.Pp 
     47When launched with 
     48.Fl h , 
     49.Nm 
     50will display the usage statement and exit. 
    4451.Pp 
    4552The export generated by 
  • trunk/confexport.in

    r317 r321  
    4040fi 
    4141 
     42function print_help { 
     43    echo "usage: $0 [-d]">&4 
     44    exit ${1:-0} 
     45} 
     46 
     47while getopts "hd" OPT 2>&4 ; do 
     48    case "$OPT" in 
     49        d)  DEBUG=true ;; 
     50        h)  print_help 0;; 
     51        *)  print_help 1;; 
     52    esac 
     53done 
     54 
    4255# If we're in debug mode, we should log stderr messages to the logger 
    4356# as well. Otherwise, we send them to the bit bucket. 
  • trunk/confsync.8

    r288 r321  
    3333.Sh SYNOPSIS 
    3434.Nm 
     35.Nm 
     36.Fl h 
    3537.Sh DESCRIPTION 
    3638The 
     
    4345.Cm confman commit 
    4446operation without the overhead of a working copy. 
     47.Pp 
     48When launched with 
     49.Fl h , 
     50.Nm 
     51will display the usage statement and exit. 
    4552.Pp 
    4653The use of 
  • trunk/confsync.in

    r302 r321  
    3636    echo "Can't find confmancommon.sh. Exiting." >&2 
    3737fi 
     38 
     39function print_help { 
     40    echo "usage: $0 [-d]" >&4 
     41    exit ${1:-0} 
     42} 
     43 
     44while getopts "hd" OPT 2>&4 ; do 
     45    case $OPT in 
     46        d)  DEBUG=true ;; 
     47        h)  print_help 0;; 
     48        *)  print_help 1;; 
     49    esac 
     50done 
    3851 
    3952trap "conf_cleanExit" EXIT 
Note: See TracChangeset for help on using the changeset viewer.