#!/bin/sh
# @(#)postremove 1.10 02/02/27 SMI
# Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# Postremove script to update sundocs.html file

if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
	SDOCSBASE="`pkgparam SUNWsdocs BASEDIR`"
	DOCSDIR=${SDOCSBASE}
else
	SDOCSBASE="`pkgparam -R ${PKG_INSTALL_ROOT} SUNWsdocs BASEDIR`"
	DOCSDIR=${PKG_INSTALL_ROOT}${SDOCSBASE}
fi

EDITSUNDOCS=${DOCSDIR}/SUNWsdocs/sun_docs/edit_sundocshtml

if [ -x $EDITSUNDOCS ]
then
	$EDITSUNDOCS r

	if [ $? -eq 0 ]; then
		exit 0
	else
		exit 2
	fi
else
	exit 2
fi
