#!/bin/sh
 
LIBDTHELP_HOME=/usr/dt/lib/libDtHelp.so
ALT_LIBDTHELP_HOME=/opt/SUNWdt/lib/libDtHelp.so
DEFAULT_HELP_HOME=dt
ALT_HELP_HOME=SUNWdt

DTHOME=/usr/dt
DT_BASEDIR=/usr

#
# If we write to DTHOME, set help_home to default.
# This assumes that BASEDIR = /usr.
#
if [ -f ${DTHOME} ]
then
	tmp_install_file=${DTHOME}/tmp.install.file.$$
else
	tmp_install_file=${DT_BASDIR}/tmp.install.file.$$
fi

touch ${tmp_install_file}

if  [ -f ${tmp_install_file} ]
then
	rm ${tmp_install_file}
	help_home=${DEFAULT_HELP_HOME}

#
# Write to alternate location. This assumes that BASEDIR = /opt.
#
else
	help_home=${ALT_HELP_HOME}
fi

# Make parameters available to installation service, and so
# to any other packaging scripts
cat >$1 <<!
HELP_HOME='$help_home'
!


exit 0
