Gentoo Archives: gentoo-dev

From: Jeroen Roovers <jer@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: sed script redundancy
Date: Sat, 21 May 2011 17:35:26
Message-Id: 20110521193434.3f623fa6@epia.jer-c2.orkz.net
In Reply to: Re: [gentoo-dev] RFC: sed script redundancy by Fabian Groffen
1 On Fri, 20 May 2011 17:56:00 +0200
2 Fabian Groffen <grobian@g.o> wrote:
3
4 > sed -e "<pattern>" "${file}" | diff "${file}" -
5 >
6 > followed by the actual sed -i -e ...
7 >
8 > This way I didn't need to write an intermediate file.
9
10 The problem there is that sed might be called just once on any one file,
11 but in the tree it is often invoked with multiple scripts, so this
12 simple implementation lacks a way to evaluate which sed scripts are
13 useful.
14
15 Also, how do I ensure the sed replacement works only on invocations
16 inside the ebuild, and not, say, in portage's internals?
17
18
19 jer

Replies

Subject Author
Re: [gentoo-dev] RFC: sed script redundancy Fabian Groffen <grobian@g.o>