]> granicus.if.org Git - nethack/commitdiff
nethack.sh: test -e vs test -f
authorPatR <rankin@nethack.org>
Tue, 12 Mar 2019 21:11:26 +0000 (14:11 -0700)
committerPatR <rankin@nethack.org>
Tue, 12 Mar 2019 21:11:26 +0000 (14:11 -0700)
Change the test for whether fonts.dir exists (added to the script
in 3.6.0, for automatically setting up possible use of the NH10 font
under X11) from 'test -e file' to 'test -f file' since the latter
seems to be more universally available.  When present, fonts.dir is
plain text, so a test for "exists and is a regular file" rather than
one for general existance is appropriate.

doc/fixes36.2
sys/unix/nethack.sh

index f293fec72c9d1f7b523bcf783f49de4da4bd5239..fe465e3e9a29162c88c33c64fad52202cb4e7abc 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.272 $ $NHDT-Date: 1552422652 2019/03/12 20:30:52 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.273 $ $NHDT-Date: 1552425075 2019/03/12 21:11:15 $
 
 This fixes36.2 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -517,6 +517,8 @@ unix: Makefile.src and Makefile.utl inadvertently relied on a 'gnu make'
        specifically requested; use 'make QUIETCC=1 <target>' to get the
        3.6.1 behavior back
 unix: add curses window port
+unix: in nethack.sh, use 'test -f' instead of 'test -e' when checking for
+       fonts.dir while running under X11
 vms: data file processing and playground setup were missing post-3.4.3 files
        engrave, epitaph, and bogusmon made from corresponding *.txt
 windows: Added ntassert() mechanism for Windows based port use
index 7ca74865d20f0b4a7c3af5742a30704ff3f2b83e..2c2b62cdf58ea9b8d09cacd23f334fc8085bd07e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# NetHack 3.6  nethack.sh      $NHDT-Date: 1524689450 2018/04/25 20:50:50 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.19 $
+# NetHack 3.6  nethack.sh      $NHDT-Date: 1552425075 2019/03/12 21:11:15 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.20 $
 # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
 # NetHack may be freely redistributed.  See license for details.
 
@@ -17,7 +17,7 @@ esac
 export XUSERFILESEARCHPATH
 
 # Get font dir added, but only once (and only if there's an xset to be found).
-test -n "$DISPLAY" -a -e $HACKDIR/fonts.dir && xset p >/dev/null 2>&1 && (
+test -n "$DISPLAY" -a -f $HACKDIR/fonts.dir && xset p >/dev/null 2>&1 && (
        xset fp- $HACKDIR >/dev/null 2>&1;
        xset fp+ $HACKDIR
 )