summaryrefslogtreecommitdiff
path: root/community/tremulous/tremded.sh
blob: 339bdd5014ef98f1fba0f02d05a179bd30c54645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
CARCH=`uname -m`
ext=x86; [ "$CARCH" = 'x86_64' ] && ext=x86_64

[ -f /etc/tremdedrc ] && . /etc/tremdedrc
[ -f "$HOME/.tremdedrc" ] && . "$HOME/.tremdedrc"

if [ ! -r "$HOME/.tremulous/base/vm/game.qvm" ]; then
	echo "Cannot find game.qvm -- linking to installed version."
	if [ ! -d "$HOME/.tremulous/base/vm" ]; then
		mkdir -p "$HOME/.tremulous/base/vm/" || exit 1
	fi
	ln -s /opt/tremulous/game.qvm "$HOME/.tremulous/base/vm/game.qvm" || exit 1
fi

cd /opt/tremulous/
./tremded.$ext "$TREM_ARGS" "$@"