Re: [gentoo-dev] RFC: sed script redundancy

2013-06-09 Thread Jeroen Roovers
On Fri, 20 May 2011 17:39:22 +0200 Jeroen Roovers wrote: > for a while now I've been wondering if all those sed scripts in all > those ebuilds are really effective. This took rather long to find some spare time for. Plonk the attached bash script into /etc/portage/bashrc.d (which you source in

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-29 Thread Christopher Schwan
On Sunday 29 May 2011 13:00:32 Fabian Groffen wrote: > On 29-05-2011 12:44:46 +0200, Christopher Schwan wrote: > > Thank you for that script. I experimented a bit with it and have a number > > of corrections and suggestions: > > > > - alias does not work because my_sed is not declared at this stag

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-29 Thread Fabian Groffen
On 29-05-2011 12:44:46 +0200, Christopher Schwan wrote: > Thank you for that script. I experimented a bit with it and have a number of > corrections and suggestions: > > - alias does not work because my_sed is not declared at this stage. I removed > the whole alias line because I want to selecti

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-29 Thread Christopher Schwan
Thank you for that script. I experimented a bit with it and have a number of corrections and suggestions: - alias does not work because my_sed is not declared at this stage. I removed the whole alias line because I want to selectively enable my_sed - oargs must be an array in order to make quoti

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-22 Thread Fabian Groffen
On 21-05-2011 19:34:34 +0200, Jeroen Roovers wrote: > On Fri, 20 May 2011 17:56:00 +0200 > Fabian Groffen wrote: > > > sed -e "" "${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 th

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-21 Thread Jeroen Roovers
On Fri, 20 May 2011 17:56:00 +0200 Fabian Groffen wrote: > sed -e "" "${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

Re: [gentoo-dev] RFC: sed script redundancy

2011-05-20 Thread Fabian Groffen
On 20-05-2011 17:39:22 +0200, Jeroen Roovers wrote: > I've looked into sed's internal solutions to no avail, but something > like -i[SUFFIX] might help, since it gives you a backup file to compare > with the file that's being streamed. > > The idea is to pass the result to > | diff -u $file $fil

[gentoo-dev] RFC: sed script redundancy

2011-05-20 Thread Jeroen Roovers
Hullo developers, for a while now I've been wondering if all those sed scripts in all those ebuilds are really effective. To find out, I've tried a couple of angles on a sed hook that basically dissects the sed command line provided, divides everything up into sed scripts, files being proc