From: Karl Berry Date: Sat, 20 Sep 2025 21:48:47 +0000 (-0700) Subject: ylwrap: trivial shell fixes. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9075f2e05fb08c2e1a5c0c5f670eba14e3823905;p=thirdparty%2Fautomake.git ylwrap: trivial shell fixes. * lib/ylwrap: exit if cd fails, quote args to test, doc typos. --- 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