From a5ba05345e11bc288fda71250251213f05402022 Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 24 Jan 2010 10:08:32 +0000 Subject: [PATCH] startscript --- mk/linux/glest | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 mk/linux/glest diff --git a/mk/linux/glest b/mk/linux/glest new file mode 100755 index 000000000..5c929cdc9 --- /dev/null +++ b/mk/linux/glest @@ -0,0 +1,24 @@ +#!/bin/sh + +# Library directory +LIBDIR="lib" + +# If we are launching from a symlink, such as /usr/local/bin/runglest.sh, we need to get where +# the symlink points to +pth="`readlink $0`" + +# $pth will be empty if our start path wasnt a symlink +if [ $pth ]; then + GAMEDIR="`dirname $pth`" +else + GAMEDIR="`dirname $0`" +fi + +# Change to the game dir, and go! +cd $GAMEDIR +# export game library directory +test -n "${LIBDIR}" && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GAMEDIR}/${LIBDIR}" + +./glest.bin > glest.log 2>&1 +# ./glest > /tmp/`date +"%F_%k-%M-%S"`.glest.log 2>&1 +