#!/bin/sh
# preinstall script for SUNWplow
# to set up correct environment

if [ -d ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15 ]; then
  if [ -d ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15/props ]; then
    if [ -s ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15/props/* ]; then
      echo "/usr/openwin/share/locale/en_GB.ISO8859-15/props contains user data"
      echo "Installation of SUNWplow will partially fail."
    else 
      rm -rf ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15/props
    fi
  fi
  if [ -s ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15/* ]; then
     echo "/usr/openwin/share/locale/en_GB.ISO8859-15 contains user data"
     echo "Installation of SUNWplow will partially fail."
   else
     rm -rf ${BASEDIR}/openwin/share/locale/en_GB.ISO8859-15
  fi
fi

exit 0
