nethack.sh: test -e vs test -f
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.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user