#!/sbin/sh
#
########
#  Product: VIDEOOUT
#  Fileset: VIDEOOUT
#  VIDEOOUT unconfigure
#  @(#) $Revision: 1.2 $
########
#
# (c) Copyright Hewlett-Packard Company, 1995
#
########
#
# This script will:
#   - remove the help links and rerun helpgen
#   - remove symbolic links integrating VideoOut with HPVUE
#

	# Get the utilities I'll need
PROD_UTILS=${SW_ROOT_DIRECTORY}usr/lbin/sw/control_utils
if [[ ! -f $PROD_UTILS ]]
then
   echo "ERROR:  Cannot find $PROD_UTILS"
   exit 1
fi

. $PROD_UTILS

mod_pathfile -d MP /opt/videoout/share/man

CWD="$SW_ROOT_DIRECTORY"
PATH=$PATH:/usr/sbin/:/usr/bin/X11

VIDEOOUT_HELP_LINK=/etc/vhelp/volumes/C/video_out.hv
VIDEOOUT_FAMILY_LINK=/etc/vhelp/families/C/videoout.hf

rm -f ${VIDEOOUT_HELP_LINK} > /dev/null 2>&1
rm -f ${VIDEOOUT_FAMILY_LINK} > /dev/null 2>&1

#
# Run helpgen after removing links.
#
if [ -f /usr/vue/bin/helpgen ]; then
   /usr/vue/bin/helpgen > /dev/null 2>&1
fi


#
# Bitonal icons
#
rm -f $CWD/etc/vue/icons/videoout.l.bm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/videoout.l_m.bm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/videoout.m.bm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/videoout.m_m.bm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/videoout.s.bm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/videoout.s_m.bm > /dev/null 2>&1

#
# Color icons
#
rm -f $CWD/etc/vue/icons/Color/videoout.l.pm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/Color/videoout.m.pm > /dev/null 2>&1
rm -f $CWD/etc/vue/icons/Color/videoout.s.pm > /dev/null 2>&1

#
# Application
#
rm -f $CWD/etc/vue/config/types/tools/Utilities/VideoOut > /dev/null 2>&1
rm -f $CWD/etc/vue/config/types/videoout.vf > /dev/null 2>&1

rm -f $CWD/usr/lib/X11/app-defaults/VideoOut > /dev/null 2>&1
rm -f $CWD/usr/lib/nls/msg/C/videoout.cat > /dev/null 2>&1
rm -f $CWD/usr/share/man/man1.Z/videoout.1 > /dev/null 2>&1

#
# CDE Application disintegration
#
if [ -x /usr/dt/bin/dtappintegrate ]
then
    /usr/dt/bin/dtappintegrate -s /opt/videoout -u > /dev/null 2>&1
fi

exit 0
