Hi Jeremy,
sed accepts piped input too so you can string multiple seds and greps together, try this:

cat %a/%f.patch | sed 's:@PREFIX@:%p:g' | sed 's:@DESTDIR@:%d:g' | patch -p1

There may be a more efficient way to do it but this is how I know, and it works ok.
Carsten

On Thursday, November 21, 2002, at 03:04 pm, Jeremy Erwin wrote:

Assuming I've read that correctly, sed substitutes the current definition of %p for @PREFIX@ in the patchfile , before feeding the results to patch.

I want to substitute the proper fink prefixes for two variables (@DESTDIR@ and @PREFIX@), but am unsure how to coerce sed to do this.

--
Carsten Klapp
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d-@+ s+:- a C+++@(---) UB+++ P+>++ L+>++ E>++ W-(++) N-(+) o? K? !w----
O M+(++) V? PS+ PE-(--) Y+ PGP+(++) t+@ 5 X+@ R tv+(-) b+ DI++ D-
G e(+) h(---) r y z?
------END GEEK CODE BLOCK------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to