#!/bin/sh
# ESP Package Manager v3.7.0

# echo Command after installing
# searching for the PRODUCTINSTALLLOCATION for the different platforms
platform=`uname -s`
case $platform in
SunOS)
  PRODUCTINSTALLLOCATION="$BASEDIR"
  ;;
Linux)
  PRODUCTINSTALLLOCATION="$RPM_INSTALL_PREFIX"
  ;;
*)
  PRODUCTINSTALLLOCATION="$BASEDIR" 
  ;;
esac

# creating link to libfreetype.so.6, if necessary
if [ ! -f /usr/lib/libfreetype.so.6 ]
then
  if [ ! -f $PRODUCTINSTALLLOCATION/program/libfreetype.so.6 ]
  then
    if [ -f $PRODUCTINSTALLLOCATION/program/filter/libfreetype.so.6 ]
    then
      ln -s filter/libfreetype.so.6 $PRODUCTINSTALLLOCATION/program/libfreetype.so.6 >/dev/null 2>&1
    fi
  fi
fi

exit 0
