#!/bin/bash

prefix=/usr
libdir=/usr/lib64
exec_asm="banshee.exe"
MONO_EXE="/usr/lib64/banshee/$exec_asm"

export DYLD_LIBRARY_PATH=/usr/lib64${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
export LD_LIBRARY_PATH=/usr/lib64${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
export GST_PLUGIN_PATH=/usr/lib64/banshee/gstreamer-0.10

case "x--uninstalled" in ("x$1" | "x$2")
	if [ -x ./banshee.exe -a -e ./banshee.in ]; then
		echo "** Running uninstalled Banshee **"
		MONO_EXE="./banshee.exe"
		export MONO_PATH=../hal-sharp:../entagged-sharp:../burn-sharp:${MONO_PATH+:$MONO_PATH}
	else
		echo "** Running installed Banshee, even though --uninstalled was passed **"
		echo "** To run uninstalled, your PWD must be banshee/src **"
	fi
esac

case "x--debug" in ("x$1" | "x$2")
	MONO_OPTIONS="--debug"
	echo "** Running Banshee in Debug Mode **"
esac

exec -a banshee /usr/lib64/pkgconfig/../../bin/mono $MONO_OPTIONS $MONO_EXE "$@"

