# Copyright 22 Jul 1996 Sun Microsystems, Inc. All Rights Reserved.
#
#pragma ident  "@(#)preremove	1.4 96/07/22 Sun Microsystems"
#
# preremove script for Openstep Header Files.
#
# Return pid of named process in variable "pid"
#
# Exit codes for installation scripts
 
export BASEDIR
 
e_ok=0
e_fatal=1      # stop installation on this exit
e_warning=2    # Installation will go on.
e_int=3        # Interrupted. Stop installation
e_reboot=10    # User must reboot after installation of all selected packages
e_rebootnow=20 # User must reboot right after installation of current package
               # To be added to one of the single-digit exit codes above
 
#
# Trap interrupt
#
trap `exit $e_int` 15
#
 
#

pkginfo -q $PKGINST
if [ $? -eq 0 ]
    then

	if [ -f $BASEDIR/$DOEDIR/openstep/include/AppKit/AppKit.p ]; then
		rm -rf $BASEDIR/$DOEDIR/openstep/include/AppKit/AppKit.p
	fi
	if [ -f $BASEDIR/$DOEDIR/openstep/include/Foundation/Foundation.p ]; then
		rm -rf $BASEDIR/$DOEDIR/openstep/include/Foundation/Foundation.p
	fi
	if [ -f $BASEDIR/$DOEDIR/openstep/include/DPSClient/DPSClient.p ]; then
		rm -rf $BASEDIR/$DOEDIR/openstep/include/DPSClient/DPSClient.p
	fi
	if [ -f $BASEDIR/$DOEDIR/openstep/include/soundkit/soundkit.p ]; then
		rm -rf $BASEDIR/$DOEDIR/openstep/include/soundkit/soundkit.p
	fi
fi
#
 
exit $e_ok
 

