#!@bash@

# This line will be automatically uncommented when you "make install"
#installed=1

if [ -z $installed ] ; then
    echo "*** Running uninstalled @target@ ***"
    THIS_PATH="../Util:../BeagleClient:."
    THIS_EXE="./@target@"

    export MONO_PATH="../Util:../BeagleClient${MONO_PATH+:$MONO_PATH}"
    export LD_LIBRARY_PATH="../glue/.libs${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
    export BEAGLE_FILTER_PATH="../Filters${BEAGLE_FILTER_PATH+:$BEAGLE_FILTER_PATH}"
else
    THIS_PATH="@pkglibdir@"
    THIS_EXE="@pkglibdir@/@target@"

    export MONO_PATH="@pkglibdir@${MONO_PATH+:$MONO_PATH}"
    export LD_LIBRARY_PATH="@pkglibdir@${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
fi

MONO_GAC_PREFIX="@gacprefix@${MONO_GAC_PREFIX+:$MONO_GAC_PREFIX}" MONO_PATH="$THIS_PATH${MONO_PATH+:$MONO_PATH}" exec -a @wrapper@ mono --debug $MONO_EXTRA_ARGS $THIS_EXE "$@"

