#!@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:../beagled"
    THIS_EXE="./@target@"
    THIS_FILTERS="../Filters"
    THIS_BACKENDS="../beagled"
else
    THIS_PATH="@pkglibdir@:@libdir@"
    THIS_EXE="@pkglibdir@/@target@"
fi

if [ -z "$BEAGLE_MONO_RUNTIME" ]; then
   export BEAGLE_MONO_RUNTIME="mono"
else
   echo "*** Using mono runtime at $BEAGLE_MONO_RUNTIME ***"
fi

MONO_GAC_PREFIX="@gacprefix@${MONO_GAC_PREFIX+:$MONO_GAC_PREFIX}" MONO_PATH="$THIS_PATH${MONO_PATH+:$MONO_PATH}" BEAGLE_FILTER_PATH="$BEAGLE_FILTER_PATH${THIS_FILTERS+:$THIS_FILTERS}" BEAGLE_BACKEND_PATH="$BEAGLE_BACKEND_PATH${THIS_BACKENDS+:$THIS_BACKENDS}" exec $BEAGLE_MONO_RUNTIME --debug $MONO_EXTRA_ARGS $THIS_EXE "$@"

