#!/bin/sh
#  Licensed Materials - Property of IBM
#
#  5724-A60
#  5765-F36
#  5765-F32
#  (C) Copyright IBM Corporation 2001, 2002
#
#  ALL rights reserved.
#  US Government Users Restricted Rights -
#  Use, duplication or disclosure restricted by GSA ADP
#  Schedule Contract with IBM Corporation.
#

# try to remove everything, including files from previous installations
if [ -L $HOME/sqllib/function/idmrec ]
then
        /bin/rm $HOME/sqllib/function/idmrec
fi
if [ -L $HOME/sqllib/function/idmdall ]
then
        /bin/rm $HOME/sqllib/function/idmdall
fi
if [ -L $HOME/sqllib/function/idmreg ]
then
        /bin/rm $HOME/sqllib/function/idmreg
fi
if [ -L $HOME/sqllib/function/idmclu ]
then
        /bin/rm $HOME/sqllib/function/idmclu
fi
if [ -L $HOME/sqllib/function/idmclf ]
then
        /bin/rm $HOME/sqllib/function/idmclf
fi
if [ -L $HOME/sqllib/function/idmrul ]
then
        /bin/rm $HOME/sqllib/function/idmrul
fi
if [ -L $HOME/sqllib/function/idmx ]
then
        /bin/rm $HOME/sqllib/function/idmx
fi
if [ -L $HOME/sqllib/function/idmxrun ]
then
        /bin/rm $HOME/sqllib/function/idmxrun
fi
if [ -L $HOME/sqllib/function/IDMEasyMiningProcedures.jar ]
then
        /bin/rm $HOME/sqllib/function/IDMEasyMiningProcedures.jar
fi

# remove executables from the PATH
if [ -f $HOME/sqllib/userprofile ]
then
   /bin/cat $HOME/sqllib/userprofile | /bin/grep -v IMinerX > $HOME/sqllib/userprofile
   CONTENT=`/bin/cat $HOME/sqllib/userprofile`
   if [ "$CONTENT" = "" ]
   then
     /bin/rm $HOME/sqllib/userprofile
   fi
fi


exit 0;
