2006-03-14 22:26:35 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Rev: $Id: ioquake3.sh,v 1.11 2006/01/18 13:47:42 raistlin Exp raistlin $
|
|
|
|
# Needed to make symlinks/shortcuts work.
|
|
|
|
# the binaries must run with correct working directory
|
|
|
|
|
|
|
|
IOQ3_DIR=/usr/local/share/games/quake3
|
|
|
|
|
2007-11-30 15:08:57 +00:00
|
|
|
COMPILE_PLATFORM=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
|
2006-03-14 22:26:35 +00:00
|
|
|
COMPILE_ARCH=`uname -p | sed -e s/i.86/i386/`
|
|
|
|
|
|
|
|
EXEC_REL=release
|
|
|
|
|
|
|
|
EXEC_BIN=ioquake3.${COMPILE_ARCH}
|
2007-11-30 15:08:57 +00:00
|
|
|
# EXEC_BIN=ioquake3-smp.${COMPILE_ARCH}
|
|
|
|
# EXEC_BIN=ioq3ded.${COMPILE_ARCH}
|
2006-03-14 22:26:35 +00:00
|
|
|
|
2008-03-28 16:16:38 +00:00
|
|
|
EXEC_FLAGS="+set fs_basepath ${IOQ3_DIR} +set vm_game 1 +set vm_cgame 1 +set vm_ui 1 +set sv_pure 1 +set ttycon 0 +set com_ansiColor 0"
|
2006-03-14 22:26:35 +00:00
|
|
|
|
2007-11-30 15:08:57 +00:00
|
|
|
EXEC_DIR_LIST="${IOQ3_DIR}"
|
2006-03-14 22:26:35 +00:00
|
|
|
|
|
|
|
for d in ${EXEC_DIR_LIST}
|
|
|
|
do
|
|
|
|
if [ -d $d ]; then
|
|
|
|
EXEC_DIR=${d}
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "X${EXEC_DIR}" != "X" ]; then
|
|
|
|
if [ ! -x ${EXEC_DIR}/${EXEC_BIN} ]; then
|
|
|
|
echo "Executable ${EXEC_DIR}/${EXEC_BIN} not found!" ; exit 1
|
|
|
|
fi
|
|
|
|
cd ${IOQ3_DIR} && \
|
|
|
|
${EXEC_DIR}/${EXEC_BIN} ${EXEC_FLAGS} $*
|
|
|
|
exit $?
|
|
|
|
else
|
|
|
|
echo "No ioq3 binaries found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|