updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / tremfusion / tremfusion-tty.sh
blobf43909a7067b95409065617f19a77c544458e24d
1 #!/bin/bash
3 LIBDIR=/opt/tremulous
4 DATADIR=/opt
6 BINARY=$LIBDIR/tremfusion/$(basename $0)
7 BASE_PATH="$DATADIR/tremulous"
8 EXTRA_PATH="$DATADIR/tremfusion"
9 QUIET=0
11 # TremFusion binaries don't understand "regular" command line parameters. Let's
12 # catch them here, to avoid accidently launching the binary.
14 while [ "$1" != "" ]; do {
15 if [ "$1" = "+set" -o "$1" = "+connect" ]; then
16 break;
18 case "$1" in
19 -q|--quiet)
20 QUIET=1
22 esac
23 shift
24 }; done
26 # Ready to rumble!
28 if [ ${QUIET} -eq 1 ]; then
29 exec ${BINARY} +set fs_basepath ${BASE_PATH} +set fs_extrapath ${EXTRA_PATH} $* >/dev/null 2>&1
30 else
31 exec ${BINARY} +set fs_basepath ${BASE_PATH} +set fs_extrapath ${EXTRA_PATH} $*
34 exit $?