summaryrefslogtreecommitdiff
path: root/games/rott/rott.sh
blob: dea7ee767f32f34e33d2803fb77a14565ffdd5f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

# Wrapper script for Rise of the Triad, by B. Watson

# Figures out which rott binary to execute, based on which
# game data files are installed.

DATADIR=/usr/share/games/rott
CDROMFILE=$DATADIR/ROTTCD.RTC
REGFILE=$DATADIR/DARKWAR.WAD
DEMOFILE=$DATADIR/HUNTBGIN.WAD
BINDIR=/usr/games

if [ -r $CDROMFILE ]; then
	exec $BINDIR/rott-cdrom "$@"
elif [ -r $REGFILE ]; then
	exec $BINDIR/rott-reg "$@"
elif [ -r $DEMOFILE ]; then
	exec $BINDIR/rott-demo "$@"
else
	cat 1>&2 <<EOF
$0: Can't find any usable game data files.

Copy the game data files from either the shareware or full version
of ROTT to /usr/share/games/rott, and if necessary, rename the files
to ALL UPPERCASE names (e.g. DARKWAR.WAD).
EOF
	exit 1
fi