head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 98.09.02.12.18.35; author alexis; state Exp; branches; next 1.2; 1.2 date 98.09.01.18.35.09; author alexis; state Exp; branches; next 1.1; 1.1 date 98.09.01.18.10.51; author alexis; state Exp; branches; next ; desc @@ 1.3 log @added DISPLAY checks added '-b' option to specify explicit browswe removed PATH setting @ text @#!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.2 1998/09/01 18:35:09 alexis Exp alexis $ ############################################################################### # # 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 @ 1.2 log @normal shpp stuff ., ,. @ text @d36 1 a36 1 PATH=/bin:/usr/bin d42 3 a44 1 # $Id: mondsk.shpp,v 1.14 1998/08/30 21:15:35 alexis Exp $ a51 1 NETSCAPE=netscape d70 1 d80 3 d89 2 d103 9 a111 1 $NETSCAPE file:$INDEX d136 1 a136 1 echo "Usage: $PROGNAME" @ 1.1 log @Initial revision @ text @d3 47 d53 75 a127 1 $NETSCAPE file:$INDEX @