bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] test-linkat: avoid failed assertion on "other" architectures


From: Ralf Wildenhues
Subject: Re: [PATCH] test-linkat: avoid failed assertion on "other" architectures
Date: Fri, 11 Jun 2010 19:00:14 +0200
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Bruno,

* Bruno Haible wrote on Fri, Jun 11, 2010 at 10:45:29AM CEST:
> The trick that I use is a script that shows me the differences between
> the last run and the current run of a command. So, in my working directories,
> I normally don't run "./configure" and "make" any more, but
> "./rerun-configure" and "./rerun-make", which are tiny scripts:

Wouldn't build-aux/rerun be a good candidate for a new gnulib module?

Wrt. portability, this line:

    diff -u "$cachefile".old - | sed -e '1,2d' -e 
'/^-/{s/^-/-'"$color_blue"'/;s/$/'"$color_off"'/}' -e 
'/^+/{s/^+/+'"$color_red"'/;s/$/'"$color_off"'/}'

could profit from a quick test whether diff supports -u, and the sed
script something like

  sed -e '1,2d' \
      -e '/^-/{' -e 's/^-/-'"$color_blue"'/' -e 's/$/'"$color_off"'/' -e '}' \
      -e '/^+/{' -e 's/^+/+'"$color_red"'/' -e 's/$/'"$color_off"'/' -e '}'

then a --version option, and the script would be in pretty good shape
already.  Maybe if the exit status could be nonzero if either the diff
is nonempty or the $command failed, that would be neat.

Cheers,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]