#!@bash@

MOZILLA_HOME=@mozillahome@
export MOZILLA_HOME
 
MOZILLA_FIVE_HOME=@mozillahome@
export MOZILLA_FIVE_HOME

LD_LIBRARY_PATH="@mozillahome@:$LD_LIBRARY_PATH"

if [ -e ./@target@ ] && [ -e ./Makefile.am ] ; then
    echo "*** Running uninstalled @target@ ***"
    THIS_PATH="../Util:../images:../Lucene.Net:../indexer:../Tiles:../BeagleClient:../glue"
    THIS_EXE="./@target@"
    export LD_LIBRARY_PATH="../glue/.libs:$LD_LIBRARY_PATH"
    export PATH="../ImLogViewer:$PATH"
else
    THIS_PATH="@pkglibdir@"
    THIS_EXE="@pkglibdir@/@target@"
    export LD_LIBRARY_PATH="@pkglibdir@:$LD_LIBRARY_PATH"
fi

MONO_GAC_PREFIX="@gacprefix@:$MONO_GAC_PREFIX" MONO_PATH="$THIS_PATH:$MONO_PATH" exec -a mono-best mono $MONO_EXTRA_ARGS --debug $THIS_EXE "$@"
#MONO_GAC_PREFIX="@gacprefix@:$MONO_GAC_PREFIX" MONO_PATH="$THIS_PATH:$MONO_PATH" exec -a mono-best mono --trace $MONO_EXTRA_ARGS $THIS_EXE "$@" >& log

