3 MY_DIRECTORY="${0%/*}" # cut off the script name
4 MY_DIRECTORY="${MY_DIRECTORY%/*}" # cut off MacOS
5 MY_DIRECTORY="${MY_DIRECTORY%/*}" # cut off Contents
7 #export DYLD_LIBRARY_PATH="$MY_DIRECTORY/Contents/MacOS"
9 cd "$MY_DIRECTORY/Contents/MacOS/install"
11 # autodetect nexuiz installs
12 NEX_DIRECTORY="/${MY_DIRECTORY%/*}"
14 if [ -z "$NEX_DIRECTORY" ]; then
17 if [ -f "$NEX_DIRECTORY/data/common-spog.pk3" ]; then
18 if [ -d "$NEX_DIRECTORY/Nexuiz.app" ]; then
22 NEX_DIRECTORY=${NEX_DIRECTORY%/*}
24 case "$NEX_DIRECTORY" in
26 NEX_DIRECTORY=${NEX_DIRECTORY#/}
27 set -- -global-gamefile nexuiz.game -nexuiz.game-EnginePath "$NEX_DIRECTORY/"
28 # -global-gamePrompt false?
35 if [ -x /usr/bin/open-x11 ]; then
36 exec /usr/bin/open-x11 ./radiant.ppc "$@"
38 exec ./radiant.ppc "$@"