#!/bin/bash -e

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

domain=whatafailure-by-yeoldelaptopsposse

APP_FULLNAME="what a failure"
APP_COPYRIGHT="Ye Olde Laptops Posse"
APP_DESC="demo by Ye Olde Laptops Posse released in 2012"

APP_EXE="yo04_lnx"

function run()
{
	backuppwd=$(pwd)
	cd /usr/lib/x86_64-linux-gnu/${domain}
	LD_LIBRARY_PATH=./:/usr/lib/x86_64-linux-gnu/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
