Initial Comit: First commit.
[SauerEngine.git] / sauerbraten_unix
blob0b06c067b9a1a2b96a6c90ba7a817502c7f1c01c
1 #!/bin/sh
2 # SAUER_DIR should refer to the directory in which Sauerbraten is placed.
3 #SAUER_DIR=~/sauerbraten
4 #SAUER_DIR=/usr/local/sauerbraten
5 SAUER_DIR=.
7 # SAUER_OPTIONS contains any command line options you would like to start Sauerbraten with.
8 #SAUER_OPTIONS="-f"
9 SAUER_OPTIONS="-q${HOME}/.sauerbraten -r"
11 # SYSTEM_NAME should be set to the name of your operating system.
12 #SYSTEM_NAME=Linux
13 SYSTEM_NAME=`uname -s`
15 # MACHINE_NAME should be set to the name of your processor.
16 #MACHINE_NAME=i686
17 MACHINE_NAME=`uname -m`
19 case ${SYSTEM_NAME} in
20 Linux)
21 SYSTEM_NAME=linux_
24 SYSTEM_NAME=native_
26 esac
28 case ${MACHINE_NAME} in
29 i486|i586|i686)
30 MACHINE_NAME=
33 if [ ${SYSTEM_NAME} != native_ ]
34 then
35 SYSTEM_NAME=native_
37 MACHINE_NAME=
39 esac
41 if [ -x ${SAUER_DIR}/bin_unix/native_client ]
42 then
43 SYSTEM_NAME=native_
44 MACHINE_NAME=
47 if [ -x ${SAUER_DIR}/bin_unix/${MACHINE_NAME}${SYSTEM_NAME}client ]
48 then
49 cd ${SAUER_DIR}
50 exec ${SAUER_DIR}/bin_unix/${MACHINE_NAME}${SYSTEM_NAME}client ${SAUER_OPTIONS} $@
51 else
52 echo "Your platform does not have a pre-compiled Sauerbraten client."
53 echo "Please follow the following steps to build a native client:"
54 echo "1) Ensure you have the SDL, SDL-image, SDL-mixer, and OpenGL libraries installed."
55 echo "2) Change directory to src/ and type \"make install\"."
56 echo "3) If the build succeeds, return to this directory and run this script again."
57 exit 1