Date: Sun, 16 Jun 2002 22:19:25 +0200 From: Anders Nordby <anders@FreeBSD.org> To: Pete Fritchman <petef@absolutbsd.org> Cc: Doug Barton <DougB@FreeBSD.org>, Ade Lovett <ade@FreeBSD.org>, Akinori MUSHA <knu@iDaemons.org>, Trevor Johnson <trevor@jpj.net>, Mikhail Teterin <mi+mx@aldan.algebra.com>, portmgr@FreeBSD.org, Maxim Sobolev <sobomax@FreeBSD.org>, ports@FreeBSD.org, jmallett@FreeBSD.org Subject: Re: REINPLACE Message-ID: <20020616201925.GA69961@totem.fix.no> In-Reply-To: <20020615235753.B80964@absolutbsd.org> References: <B931592E.11EA7%ade@FreeBSD.org> <3D0C06E6.7B114900@FreeBSD.org> <20020615235753.B80964@absolutbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, On Sat, Jun 15, 2002 at 11:57:53PM -0400, Pete Fritchman wrote: >> In the rare circumstance that this matters, you could use .orig if it >> makes you feel better (since we'd have to deal with that anyway). The >> other alternative is to simply remove the files, like it's sometimes >> necessary to do with the .orig files. Look at Spam Assassin for an >> example of that. > You could also do something like: > > ${SED} -e 's,foo,bar,' < ${WRKSRC}/foo > ${WRKSRC}/foo.new > ${MV} ${WRKSRC}/foo.new ${WRKSRC}/foo > > That way you're left with no extra files lying around. This gives foo the permissions of foo.new, and may or may not be desirable. Also, it's a two-command operation while perl -i is one. To me, in place editing is cleaner. I don't need to use Perl (even though I happen to like the Perl way of doing regexps), but would like something that is not different in -stable and -current for replacement.. Cheers, -- Anders. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020616201925.GA69961>