Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2003 17:55:32 -0500
From:      The Anarcat <anarcat@anarcat.ath.cx>
To:        Doug Barton <DougB@freebsd.org>
Cc:        Adrian Steinmann <ast@marabu.ch>, current@freebsd.org, subscriber@insignia.com, "Jacques A. Vidrine" <nectar@freebsd.org>
Subject:   Re: Plea for base system trim
Message-ID:  <20030305225532.GG24059@xtanbul>
In-Reply-To: <20030305142412.D50404@12-234-22-23.pyvrag.nggov.pbz>
References:  <200303051700.SAA06561@marabu.marabu.ch> <20030305142412.D50404@12-234-22-23.pyvrag.nggov.pbz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed Mar 05, 2003 at 02:29:00PM -0800, Doug Barton wrote:
> On Wed, 5 Mar 2003, Adrian Steinmann wrote:
> 
> >
> > I use this command in my build script to force apache13+modssl to use
> > the openssl in base.
> >
> > # Use base openssl (OpenSSL 0.9.7a as of Feb 19 2003)
> > cd /usr/ports/www/apache13-modssl
> > cp Makefile Makefile-
> > sed -ie 's/^\.include.*Makefile\.ssl.*$/OPENSSLBASE=\/usr/' Makefile- >Makefile
> 
> You could instead do:
> 
> sed <pattern> Makefile > makefile
> 
> The lowercase makefile will be used by make in preference to Makefile.

Juste jumping in... Couldn't you just:

sed -i.orig -e <pattern> Makefile

For example:

anarcat@carthage[~]% cat > foo                  
this is a test
anarcat@carthage[~]% sed -i.orig -e 's/test/gizmo/' foo 
anarcat@carthage[~]% diff -u foo.orig foo
--- foo.orig    Wed Mar  5 17:54:09 2003
+++ foo Wed Mar  5 17:54:13 2003
@@ -1 +1 @@
-this is a test
+this is a gizmo

Much simpler, unless I missed something.

A.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030305225532.GG24059>