#!/bin/sh
#
# @(#)preinstall 1.1     97/11/06 SMI
#
# SUNWcamow - removing leftover files from Solaris 7
#

EXEC_BASE=/usr

remove_bool=0

for PKG in SUNWdodte SUNWeodte SUNWfodte SUNWiodte SUNWsodte; do
	pkgparam  $PKG ARCH  > /dev/null 2>&1
	exist=$?
	if [ $exist != 0 ] ; then
		remove_bool=1
		continue
	fi
done

if [ $remove_bool = 1 ]; then
	for LOC in es_CR  es_GT es_NI es_PA es_SV; do
		if [ -d ${BASEDIR}/openwin/share/locale/${LOC} ]; then		
			if [ -d ${BASEDIR}/openwin/share/locale/${LOC}/props ]; then
				if [ -f ${BASEDIR}/openwin/share/locale/${LOC}/props/basic_setting ]; then
					rm -f ${BASEDIR}/openwin/share/locale/${LOC}/props/basic_setting > /dev/null 2>&1
				fi
				rmdir ${BASEDIR}/openwin/share/locale/${LOC}/props > /dev/null 2>&1
			fi
			rmdir ${BASEDIR}/openwin/share/locale/${LOC} > /dev/null 2>&1
		fi
	done
fi

exit 0
