#!/bin/sh
PARAMS="-basedir /usr/share/games/nexuiz"

EXCUSE="\
Nexuiz client wrapper\n\
This script is Debian specific, it is *NOT* part of the source distribution!\n\
Usage: nexuiz [OPTION]...\n\
\n\
 -h, --help\t\tDisplay this help\n\
 -q, --quiet\t\tDisable console output\n\
 +<internal command>\tPass commands to the engine\n"

QUIET=0

case "$1" in
	-h|--help)
		echo -e ${EXCUSE}
		exit 0
		;;
	-q|--quiet)
		QUIET=1
		shift
		;;
esac

# Ready to rumble!
if [ ${QUIET} = 1 ]; then
	exec /usr/lib/games/nexuiz/nexuiz.bin $PARAMS "$@" >/dev/null 2>&1
else
	exec /usr/lib/games/nexuiz/nexuiz.bin $PARAMS "$@"
fi
