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 |