#!/sbin/sh

PATH=$PATH:/usr/bin:/usr/ucb:/usr/ccs/bin

set -a
DTHELPVIEW=/usr/dt/bin/dthelpview

#-------------------------------------------------------------#
#
# TED want's the help volume file without ".hv" extension
# the others want it the other way around
#
#-------------------------------------------------------------#

what $DTHELPVIEW | grep TED > /dev/null
if [ $? -eq 0 ]
then
  TECREF=tecref
else
  TECREF=tecref.hv
fi

if [ $# -eq 0 ]
then
  VOLUME=/usr/lib/X11/700X/dt/usr/appconfig/help/C/tecref

  #-------------------------------------------------------------#
  # Alternate path is for 10.0
  #-------------------------------------------------------------#
  #
  ALTVOLUME=/opt/hpxt/enware/usr/lib/vhelp/ENWARE/C/tecref.hv
  if [ ! -d "`dirname $VOLUME`" -a -d "`dirname $ALTVOLUME`" ]
  then
    VOLUME=$ALTVOLUME
  fi
else
  if [ $# -eq 1 ]
  then
    VOLUME=$1
  else
    echo "usage: $0 <helpvolume>"
    exit 1
  fi
fi


exec $DTHELPVIEW -helpVolume $VOLUME
