#!/bin/bash

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

export DYLD_LIBRARY_PATH=/usr/lib:/usr/lib/banshee${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/banshee${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
export GST_PLUGIN_PATH=/usr/lib/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"
	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/lib/pkgconfig/../../bin/mono $MONO_OPTIONS $MONO_EXE "$@"

