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