File: sandbox_unix

package info (click to toggle)
sandboxgamemaker 2.5%2Bdfsg-5
  • links: PTS, VCS
  • area: contrib
  • in suites: squeeze
  • size: 15,628 kB
  • ctags: 11,559
  • sloc: cpp: 78,305; makefile: 721; sh: 318
file content (31 lines) | stat: -rw-r--r-- 969 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# SANDBOX_DIR should refer to the directory in which sandbox is placed.
#SANDBOX_DIR=~/sandbox
#SANDBOX_DIR=/usr/local/sandbox
SANDBOX_DIR=.

#SANDBOX_OPTIONS="-r"
SANDBOX_OPTIONS="-q${HOME}/.platinumarts -r"

case $(uname -m) in
i386|i486|i586|i686)
  MACHINE_BIT=32
  ;;
*)
  MACHINE_BIT=64 #assume 64bit otherwise
  ;;
esac

if [ -a ${SANDBOX_DIR}/bin/sandbox_client_${MACHINE_BIT}_fps ]
then
	cd ${SANDBOX_DIR}
	chmod +x ./bin/sandbox_??????_* #server and client are 6 characters; don't want to make the windows stuff executable
	exec ./bin/sandbox_client_${MACHINE_BIT}_fps ${SANDBOX_OPTIONS} $*
else
	echo "A problem was encountered, please check which of the following it is."
	echo "1) There isn't an available executable for your architecture; $(uname -m)"
	echo "2) the executable was moved"
	echo "3) There isn't an executable"
	echo "install the sdl, sdlimage and sdlmixer libs and try \"cd src && make install\" to compile a binary"
	exit 1
fi