Changeset 321 for trunk/confexport.in


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

Usage statements and -h support for all scripts.

Fixes #21

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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. 
Note: See TracChangeset for help on using the changeset viewer.