#!/bin/sh
# ESP Package Manager v3.7.0
# echo Command after removing

LASTUNINSTALL=1	# important for RPM deinstallation

# searching for the PRODUCTINSTALLLOCATION for the different platforms
platform=`uname -s`
case $platform in
SunOS)
  PRODUCTINSTALLLOCATION="$BASEDIR"
  ;;
Linux)
  PRODUCTINSTALLLOCATION="$RPM_INSTALL_PREFIX"
  if [ "$1" = 1 ]	# one package left after deinstallation -> update
  then
    LASTUNINSTALL=0
  fi
  ;;
*)
  PRODUCTINSTALLLOCATION="$BASEDIR" 
  ;;
esac

if [ -h $PRODUCTINSTALLLOCATION/program/libfreetype.so.6 -a $LASTUNINSTALL -eq 1 ]
then
  rm -f $PRODUCTINSTALLLOCATION/program/libfreetype.so.6 2>/dev/null
fi

exit 0
