Subject: Re: sed and pkg_rolling-replace on Solaris/SPARC
To: None <mehul.sanghvi@gmail.com>
From: Tobias Nygren <tnn@NetBSD.org>
List: pkgsrc-users
Date: 06/29/2007 19:28:40
This is a multi-part message in MIME format.

--Multipart=_Fri__29_Jun_2007_19_28_40_+0200_kzV9.O9.Kl2CcfB1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Fri, 29 Jun 2007 13:16:10 -0400
"Mehul N. Sanghvi" <mehul.sanghvi@gmail.com> wrote:

> There was another issue also besides the fact that "-E" is not supported by all 
> implementations of sed.

I rewrote the regex to not need -E, please try pkg_rolling-replace.sh
rev 1.10.

> The script is a /bin/sh script, but uses constructs like $(...) instead of 
> `...`, which is not supported by /bin/sh on Solaris, and I believe AIX and HPUX 
> as well.
> 
> I suspect that it works on NetBSD and probably on Linux as well since, at least 
> on Debian Linux anyway, because /bin/sh is a hard link to /bin/bash or is a 
> restricted version of bash which supports the $(...) construct.
> 
> My suggestion is to either change the shell that is uses, or use the `...` 
> construct to make the script portable.

Does the attached diff work for you?

-T

--Multipart=_Fri__29_Jun_2007_19_28_40_+0200_kzV9.O9.Kl2CcfB1
Content-Type: application/octet-stream;
 name="Makefile.diff"
Content-Disposition: attachment;
 filename="Makefile.diff"
Content-Transfer-Encoding: base64

SW5kZXg6IE1ha2VmaWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L3BrZ3NyYy9wa2d0
b29scy9wa2dfcm9sbGluZy1yZXBsYWNlL01ha2VmaWxlLHYKcmV0cmlldmluZyByZXZpc2lvbiAx
LjkKZGlmZiAtdSAtcjEuOSBNYWtlZmlsZQotLS0gTWFrZWZpbGUJMjkgSnVuIDIwMDcgMTc6MDA6
NDQgLTAwMDAJMS45CisrKyBNYWtlZmlsZQkyOSBKdW4gMjAwNyAxNzoyNTo1NyAtMDAwMApAQCAt
MzUsNiArMzUsMTIgQEAKIFNVQlNUX0ZJTEVTLm1ha2Vjb25mPQlwa2dfcm9sbGluZy1yZXBsYWNl
LnNoCiBTVUJTVF9TRUQubWFrZWNvbmY9CS1lICdzLEBNQUtFQ09ORkAsJHtNQUtFOlQ6TWJtYWtl
OlMvYm1ha2UvJHtQUkVGSVh9L2d9L2V0Yy9tay5jb25mLGcnCiAKK1NVQlNUX0NMQVNTRVMrPQkJ
c2gKK1NVQlNUX1NUQUdFLnNoPQkJcHJlLWNvbmZpZ3VyZQorU1VCU1RfTUVTU0FHRS5zaD0JRml4
aW5nIHBhdGggdG8gUE9TSVgtY29tcGF0aWJsZSBzaGVsbAorU1VCU1RfRklMRVMuc2g9CQlwa2df
cm9sbGluZy1yZXBsYWNlLnNoCitTVUJTVF9TRUQuc2g9CQktZSAncywvYmluL3NoLCR7VE9PTFNf
U0h9LCcKKwogLmluY2x1ZGUgIi4uLy4uL21rL2JzZC5wcmVmcy5tayIKIAogIyB0YXJnZXQgZXhp
c3RzIG9ubHkgdG8gZm9yY2UgY2hlY2stcGtnc3JjLXBhdGNoIHByaW9yIHRvIGluc3RhbGwK

--Multipart=_Fri__29_Jun_2007_19_28_40_+0200_kzV9.O9.Kl2CcfB1--