#!SCRIPTSHELLCMD_MARKER ############################################################################### # # # HELPME DOCUMENTS FOR JOHN # # # ############################################################################### ############################################################################### # # Things you should know about this script: # # It is stored under RCS! Keep it that way! If you want a history of # changes made to this script then refer to rlog(1) - don't look here! # ############################################################################### ############################################################################### # # USER CONFIGURABLE STUFF STARTS HERE # ############################################################################### ############################################################################### # # USER CONFIGURABLE STUFF ENDS HERE # ############################################################################### ############################################################################### # # PACKAGE INDEPENDENT VARIABLE SETTINGS # ############################################################################### #PATH=/bin:/usr/bin PROGNAME=`basename $0` VERSION="PATCHLEVEL_MARKER" #UMASK=022 #LOCK_DIR=LOCK_DIR_MARKER #ERRORS_CAUSE_EXITS=true #VERBOSE_LEVEL=2 VERBOSE_LEVEL=3 # $Id: helpme.shpp,v 1.3 1998/09/02 12:18:35 alexis Exp $ ############################################################################### # # PACKAGE SPECIFIC VARIABLE SETTINGS # ############################################################################### INDEX=PRGDOCDIR_MARKER/index.html ############################################################################### # # MAIN FUNCTION (called from very bottom of script) # ############################################################################### main() { ########################################################################### # # PROCESS OPTIONS # ########################################################################### # default values for things changable by command line options BROWSER=unset while [ "X$1" != X ]; do case "$1" in -V) echo "$PROGNAME version $VERSION" exit 0 ;; -d) [ "X$2" = X ] && usage VERBOSE_LEVEL=$2 shift ;; -v) VERBOSE_LEVEL=3 ;; -b) [ "X$2" = X ] && usage BROWSER=$2 shift ;; -*) usage ;; *) break ;; esac shift done [ "X$1" != X ] && usage # Are locks required? No. #lock # Are you going to register temporary files with deonexit()? No. #trap sighandler 1 2 15 ########################################################################## # # SCRIPT GUTS STARTS HERE # ########################################################################## if [ "X$BROWSER" != Xunset ]; then : elif [ "X$DISPLAY" = X ]; then BROWSER=lynx else BROWSER=netscape fi info "Loading $BROWSER, please wait..." $BROWSER file:$INDEX #exitdel #unlock } gen_lock_file_name() { L_LOCKWHAT=$1 # little hack is so this shell library can but doesn't have to be compiled { expr "$LOCK_DIR" : 'LOCK_DIR_MA.KER$' > /dev/null; } && LOCK_DIR= L_LOCK_DIR=${LOCK_DIR:-/var/run} # For instance if you're just preventing concurrent executions of this # program then this should be sufficient: #echo $L_LOCK_DIR/$PROGNAME.pid # On th other hand, database programs *without* a centralised db spooldir, # will want lock files in the same directory as the table file, like this: ## echo .$L_LOCKWHAT.lock } usage() { { echo "Usage: $PROGNAME [ -b ]" echo " $PROGNAME -V" } >&2 exit 2 } #shpp include utils.sh