On Fri, 20 May 2011 17:56:00 +0200 Fabian Groffen <grob...@gentoo.org> wrote:
> sed -e "<pattern>" "${file}" | diff "${file}" - > > followed by the actual sed -i -e ... > > This way I didn't need to write an intermediate file. The problem there is that sed might be called just once on any one file, but in the tree it is often invoked with multiple scripts, so this simple implementation lacks a way to evaluate which sed scripts are useful. Also, how do I ensure the sed replacement works only on invocations inside the ebuild, and not, say, in portage's internals? jer