-
Notifications
You must be signed in to change notification settings - Fork 6
/
play.sh
35 lines (28 loc) · 1.06 KB
/
play.sh
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
32
33
34
#!/bin/sh
# CC_DATA should refer to the directory in which Cube Conflict data files are placed.
#CC_DATA=~/cubeconflict
#CC_DATA=/usr/local/cubeconflict
CC_DATA=.
# CC_BIN should refer to the directory in which Cube Conflict executable files are placed.
CC_BIN=${CC_DATA}/bin_unix
# CC_OPTIONS contains any command line options you would like to start Cube Conflict with.
#CC_OPTIONS=""
CC_OPTIONS="-u${HOME}/.cubeconflict"
for arg in "$@"; do
CC_OPTIONS="${CC_OPTIONS} ${arg}"
done
export LD_LIBRARY_PATH="${CC_BIN}:$LD_LIBRARY_PATH"
# Ensure the cubeconflict binary is executable
chmod +x ${CC_BIN}/cubeconflict
if [ -x ${CC_BIN}/cubeconflict ]
then
cd ${CC_DATA}
exec ${CC_BIN}/cubeconflict ${CC_OPTIONS} "$@"
else
echo "Your platform does not have a pre-compiled Cube Conflict client."
echo "Please follow the following steps to build a native client:"
echo "1) Ensure you have the SDL2, SDL2-image, OpenAL, Libsndfile and OpenGL libraries installed."
echo "2) Type \"make -C src install\"."
echo "3) If the build succeeds, run this script again."
exit 1
fi