#!/sbin/sh
########
# Product: SW-DIST
# Fileset: SD-ENG-A-MAN
# postinstall
# @(#) $Revision: 5.2 $
########
#
# (c) Copyright Hewlett-Packard Company 1995
#
# This postinstall script removes old versions of the man pages. There are
# two different types of files which must be removed:
#     - files from previous versions of SD which were installed in different
#       locations than in this version
#     - formatted forms of the man pages which were created by the man
#       command after delivery; for example, cat1m.Z/
#
# 


##
##   Grab the standard control_utils.
##
UTILS=/usr/lbin/sw/control_utils
if [ -f $UTILS ]
then
    . $UTILS
else
    echo "ERROR:   Cannot find $UTILS"
    exit 1
fi


##
##   Remove any formatted files which may have been created by the man command
##   from previous versions of SD man pages for HP-UX 10.* systems.
##
for mp in		\
    sd.1m       	\
    swacl.1m		\
    swagent.1m		\
    swagentd.1m		\
    swconfig.1m		\
    swcopy.1m		\
    swinstall.1m	\
    swjob.1m		\
    swlist.1m		\
    swmodify.1m		\
    swpackage.1m	\
    swreg.1m		\
    swremove.1m		\
    swverify.1m
do
    rm -f ${ROOT}usr/share/man/ja_JP.eucJP/man1m/$mp 
    rm -f ${ROOT}usr/share/man/ja_JP.eucJP/cat1m.Z/$mp
done
for mp in		\
    sd.4		\
    swpackage.4
do
    rm -f ${ROOT}usr/share/man/ja_JP.eucJP/man4/$mp 
    rm -f ${ROOT}usr/share/man/ja_JP.eucJP/cat4.Z/$mp
done
rm -f ${ROOT}usr/share/man/ja_JP.eucJP/man5/sd.5 
rm -f ${ROOT}usr/share/man/ja_JP.eucJP/cat5.Z/sd.5


##
##   Exit with good status.
##
exit $SUCCESS
