#!/bin/sh

# Change to game directory
CANONPATH=`readlink -f "$0"`
cd "`dirname "$CANONPATH"`"

if [ ! -e res ] || [ ! -e SE ]
then
	echo "Missing res/ and SE/ directories in `pwd`"
	echo "Your installation is incomplete!"
	exit 1
fi

MACHINE=`uname -m`
if [ "$MACHINE" = x86_64 ]
then
	LIBS=./lib64bit
	BIN=./SyobonAction.x86_64
else
	LIBS=./lib32
	BIN=./SyobonAction.x86
fi

# Run the game:
export LD_LIBRARY_PATH=$LIBS:"$LD_LIBRARY_PATH"
$BIN $@

exit $e
