-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Robert Millan on 11/9/2009 2:00 PM: >> This is wrong, since 'echo -n' is not portable. It should use printf >> instead, >> or find some other portable way to count $m4dirs. > > Hi, > > In that case, please use printf. It should work too.
I was waiting for Bruno to reply, but your patch looks safe (with printf) and gnulib-tool already uses printf. So I'm pushing: - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkr+tOMACgkQ84KuGfSFAYCOswCgnYCtjj2M8HSq8L0/fmycdBTz 9voAnR5LStPnExXRJojQXWi7rK/R7wfM =Q2j1 -----END PGP SIGNATURE-----
>From fb1b608caaa3de195f3d97356e95a165ef5517da Mon Sep 17 00:00:00 2001 From: Robert Millan <rmh.g...@aybabtu.com> Date: Sat, 14 Nov 2009 06:45:02 -0700 Subject: [PATCH] gnulib-tool: correctly detect absence of m4 directories $m4dirs is incorrectly counting. In my particular case (correct value: 0, detected value: 1), this resulted in gnulib-tool silently exitting with no visible error (and no job done). * gnulib-tool: Avoid extra newline on data passed to wc -l. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 5 +++++ gnulib-tool | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index c821d8d..5fbff63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-14 Robert Millan <rmh.g...@aybabtu.com> (tiny change) + + gnulib-tool: correctly detect absence of m4 directories + * gnulib-tool: Avoid extra newline on data passed to wc -l. + 2009-11-14 Jim Meyering <meyer...@redhat.com> maint.mk: Prohibit inclusion of "xalloc.h" without use. diff --git a/gnulib-tool b/gnulib-tool index 397f442..aafd345 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -4500,7 +4500,7 @@ case $mode in sedexpr2='s,^[^/]*$,.,' sedexpr3='s,/[^/]*$,,' m4dirs=`sed -n -e "$sedexpr1" aclocal.m4 | sed -e "$sedexpr2" -e "$sedexpr3" | LC_ALL=C sort -u` - m4dirs_count=`echo "$m4dirs" | wc -l` + m4dirs_count=`printf %s "$m4dirs" | wc -l` fi fi if test $m4dirs_count = 0; then -- 1.6.5.rc1