#!/bin/bash -e

source /usr/share/common-install-function-ddebs/common-install-function

domain=raspberrypsy-by-desire

APP_FULLNAME="Raspberry Psy"
APP_COPYRIGHT="Desire"
APP_DESC="Demo by Desire, released in 2016"

APP_EXE="dsr-rpsy-raspberrypi.lnx"

function run()
{
	backuppwd=$(pwd)
	cd /usr/lib/arm-linux-gnueabihf/${domain}
	SDL12COMPAT_OPENGL_SCALING=0 LD_LIBRARY_PATH=./:/usr/lib/arm-linux-gnueabihf/sdl12-compat/ ./${APP_EXE}
	cd $backuppwd
}


if [ "$#" -gt "1" ]; then
	 NSH_std_usage
	exit 1
elif [ "$#" -lt "1" ]; then
	run
else
	case "$1" in
	--help)
		NSH_std_usage
		;;
	*)
		NSH_std_usage
		exit 1
		;;
	esac
fi

exit 0
