diff options
Diffstat (limited to 'app/xterm/vttests/fonts.sh')
-rw-r--r-- | app/xterm/vttests/fonts.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/app/xterm/vttests/fonts.sh b/app/xterm/vttests/fonts.sh index cdbd2c78c..9bd6692e8 100644 --- a/app/xterm/vttests/fonts.sh +++ b/app/xterm/vttests/fonts.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $XTermId: fonts.sh,v 1.17 2022/02/13 14:35:50 tom Exp $ +# $XTermId: fonts.sh,v 1.20 2022/04/25 08:19:38 tom Exp $ # ----------------------------------------------------------------------------- # this file is part of xterm # @@ -38,14 +38,15 @@ CSI="${ESC}[" CMD='/bin/echo' OPT='-n' SUF='' -TMP=`(mktemp) 2>/dev/null` || TMP=/tmp/xterm$$ +: "${TMPDIR=/tmp}" +TMP=`(mktemp "$TMPDIR/xterm.XXXXXXXX") 2>/dev/null` || TMP="$TMPDIR/xterm$$" eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null -{ test ! -f $TMP || test -s $TMP; } && +{ test ! -f "$TMP" || test -s "$TMP"; } && for verb in "printf" "print" ; do - rm -f $TMP + rm -f "$TMP" eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null - if test -f $TMP ; then - if test ! -s $TMP ; then + if test -f "$TMP" ; then + if test ! -s "$TMP" ; then CMD="$verb" OPT= SUF='\c' @@ -53,14 +54,14 @@ for verb in "printf" "print" ; do fi fi done -rm -f $TMP +rm -f "$TMP" exec </dev/tty old=`stty -g` stty raw -echo min 0 time 5 $CMD $OPT "${ESC}]50;?${SUF}" > /dev/tty -read original +read -r original stty $old original="${original}${SUF}" |