48 lines
903 B
Bash
Executable File
48 lines
903 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DPSELF=nexuiz-server
|
|
# "server" or "client"
|
|
DPROLE=server
|
|
# darkplaces or darkplaces-server
|
|
DPBINARY=darkplaces-dedicated
|
|
|
|
ENGINE="/usr/games/${DPBINARY}"
|
|
|
|
DEBUGGER="$NEXUIZ_DEBUGGER"
|
|
|
|
OPTIONS="-nexuiz -basedir /usr/share/games/nexuiz"
|
|
|
|
QUIET=0
|
|
|
|
EXCUSE="\
|
|
Nexuiz Classic ${DPROLE} wrapper\n\
|
|
\n\
|
|
Usage: ${DPSELF} [OPTION]...\n\
|
|
\n\
|
|
-h, --help\t\tDisplay this help\n\
|
|
<engine option>\tPass options to the engine\n\
|
|
+<console command>\tPass commands to the engine\n"
|
|
|
|
while [ "$1" != "" ]; do
|
|
case "$1" in
|
|
-h|--help)
|
|
echo ${EXCUSE}
|
|
exit 0
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if test "z$QUIET" = z1; then
|
|
exec >/dev/null 2>&1;
|
|
fi
|
|
|
|
if test -n "$NEXUIZ_BACKTRACE"; then
|
|
exec gdb -return-child-result -batch -ex run -ex 'thread apply all bt full' -ex kill -ex quit --args ${ENGINE} ${OPTIONS} "$@"
|
|
else
|
|
exec ${DEBUGGER} ${ENGINE} ${OPTIONS} "$@"
|
|
fi
|