2 # SCCS Id: @(#)nethack.sh 3.4 1990/02/26
4 HACKDIR=/usr/games/lib/nethackdir
9 # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH
10 case "x$XUSERFILESEARCHPATH" in
11 x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad"
13 *) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad"
16 export XUSERFILESEARCHPATH
18 # see if we can find the full path name of PAGER, so help files work properly
19 # assume that if someone sets up a special variable (HACKPAGER) for NetHack,
20 # it will already be in a form acceptable to NetHack
21 # ideas from brian@radio.astro.utoronto.ca
22 if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \)
27 # use only the first word of the pager variable
28 # this prevents problems when looking for file names with trailing
29 # options, but also makes the options unavailable for later use from
37 if test ! -f $HACKPAGER
42 if test -f $i/$HACKPAGER
44 HACKPAGER=$i/$HACKPAGER
51 if test ! -f $HACKPAGER
53 echo Cannot find $PAGER -- unsetting PAGER.
66 exec $HACK "$@" $MAXNROFPLAYERS