#! /bin/sh

if [ -z "$MULE_HOME" ] ; then
  echo "You must set the environment variable MULE_HOME to the location of your Mule install in order to run this example." 
  exit 1
fi

# If MULE_BASE is not set, make it MULE_HOME
if [ -z "$MULE_BASE" ] ; then
  MULE_BASE="$MULE_HOME"
  export MULE_BASE
fi

if [ ! -d "$MULE_BASE/apps/errorhandler" ]
then
    echo "This example requires you to build it before running it.  Please follow the instructions in the README.txt file."
    exit 1
fi         

exec "$MULE_BASE/bin/mule" -app errorhandler
