Subject: Re: CVS commit: pkgsrc/mk
To: Johnny C. Lam <jlam@NetBSD.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: pkgsrc-changes
Date: 05/13/2005 13:28:01
On Thu, May 12, 2005 at 09:56:11PM +0000, Johnny C. Lam wrote:
> 
> Module Name:	pkgsrc
> Committed By:	jlam
> Date:		Thu May 12 21:56:11 UTC 2005
> 
> Modified Files:
> 	pkgsrc/mk: find-prefix.mk
> 
> Log Message:
> Adding "${GREP} ." into pipeline that I inadvertently left out when
> moving the EVAL_PREFIX code from bsd.pkg.mk to find-prefix.mk.

My pkgsrccon slide may have given the wrong impression - I assume the
grep stage is in there to catch the occurrence when awk tries to print
a second argument which doesn't exist.  What I was trying to convey
was that it might be better to do that in awk itself:  i.e.

[13:24:10] agc@sys3 ...pkgsrc/graphics/tiff 49 > pkg_info -qp libtool-base | awk '{ if (NF > 1) { print $2; exit }}'
/usr/pkg
[13:24:35] agc@sys3 ...pkgsrc/graphics/tiff 50 > echo "@cwd" | awk '{ if (NF > 1) { print $2; exit }}'
[13:24:56] agc@sys3 ...pkgsrc/graphics/tiff 51 >

If I've picked up the problem set wrongly, please say.

Thanks,
Alistair