Donnie Berkholz wrote:
On 12:15 Mon 21 Jan     , Jean-Noel Rivasseau (elvanor) wrote:
1.1                  dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild

file : 
http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.3.1.1.ebuild?rev=1.1&content-type=text/plain

src_unpack() {
        unpack "${A}"
        patch-apply
        remove-bundled-stuff

        # No warnings / Java 5 / all output should be directed to stdout
        find "${S}" -type f -name '*.xml' -exec \
                sed -r -e "s:(-encoding ISO-8859-1):\1 -nowarn:g" -e "s:(\"compilerArg\" 
value=\"):\1-nowarn :g" \
                -e "s:(<property name=\"javacSource\" 
value=)\".*\":\1\"1.5\":g" \
                -e "s:(<property name=\"javacTarget\" value=)\".*\":\1\"1.5\":g" -e 
"s:output=\".*(txt|log).*\"::g" -i {} \;

I think this will end up calling sed a large number of times, since -exec runs per file found instead of once on all files. If you instead pipe find output to xargs sed, that might work better. Depending on how many files are involved, this could be a significant difference.

Better yet, use

  find [...] -print0 | xargs -0 sed -r -e [...] -e [...] -i

This handles files with special characters like spaces in their names.


--
fonts,                                            by design, by neglect
gcc-porting,                              for a fact or just for effect
wxwindows @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to