#!/bin/sh

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

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

# Uncomment the line below to dump core when the game crashes; useful for
# debugging, but only works if the game directory is user-writable!
#ulimit -c unlimited

# Use shipped libraries whenever possible 
export LD_LIBRARY_PATH=libs

# Run the game already!
exec ./WorldOfGoo.bin $@
