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