2 # NetHack 3.6 nethack.sh $NHDT-Date: 1432512789 2015/05/25 00:13:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.17 $
4 HACKDIR=/usr/games/lib/nethackdir
7 # NB: MAXNROFPLAYERS is deprecated in favor of MAXPLAYERS in SYSCF.
10 # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH
11 case "x$XUSERFILESEARCHPATH" in
12 x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad"
14 *) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad"
17 export XUSERFILESEARCHPATH
19 # Get font dir added, but only once (and only if there's an xset to be found).
20 test -n "$DISPLAY" -a -e $HACKDIR/fonts.dir && xset p >/dev/null 2>&1 && (
21 xset fp- $HACKDIR >/dev/null 2>&1;
25 # see if we can find the full path name of PAGER, so help files work properly
26 # assume that if someone sets up a special variable (HACKPAGER) for NetHack,
27 # it will already be in a form acceptable to NetHack
28 # ideas from brian@radio.astro.utoronto.ca
29 if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \)
34 # use only the first word of the pager variable
35 # this prevents problems when looking for file names with trailing
36 # options, but also makes the options unavailable for later use from
44 if test ! -f $HACKPAGER
49 if test -f $i/$HACKPAGER
51 HACKPAGER=$i/$HACKPAGER
58 if test ! -f $HACKPAGER
60 echo Cannot find $PAGER -- unsetting PAGER.
73 exec $HACK "$@" $MAXNROFPLAYERS