From 9075f2e05fb08c2e1a5c0c5f670eba14e3823905 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Sep 2025 14:48:47 -0700 Subject: [PATCH] ylwrap: trivial shell fixes. * lib/ylwrap: exit if cd fails, quote args to test, doc typos. --- lib/ylwrap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ylwrap b/lib/ylwrap index 7c1dc93e0..62aed82da 100755 --- a/lib/ylwrap +++ b/lib/ylwrap @@ -1,7 +1,7 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2025-06-18.21; # UTC +scriptversion=2025-09-20.21; # UTC # Copyright (C) 1996-2025 Free Software Foundation, Inc. # @@ -96,7 +96,7 @@ esac # The input. input=$1 shift -# We'll later need for a correct munging of "#line" directives. +# We'll later need this for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` case $input in [\\/]* | ?:[\\/]*) @@ -167,7 +167,7 @@ trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 -cd $dirname +cd $dirname || exit 1 case $# in 0) "$prog" "$input" ;; @@ -192,7 +192,7 @@ if test $ret -eq 0; then # destination of the .y.c rule in the Makefile. Divert the # output of all other files to a temporary file so we can # compare them to existing versions. - if test $from != $parser; then + if test "$from" != "$parser"; then realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi -- 2.47.3