Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2010 19:40:52 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        akosela@andykosela.com
Cc:        cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, az@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/ports-mgmt/bpkg Makefile ports/ports-mgmt/bpkg/files bpkg.8 bpkg.sh.in
Message-ID:  <4C9EB2B4.8090709@FreeBSD.org>
In-Reply-To: <4c9e7f4f.9pWCZ1OmPFLaLfcg%akosela@andykosela.com>
References:  <201009251455.o8PEtSxM036322@repoman.freebsd.org> <4C9E70E3.3000004@FreeBSD.org> <4c9e7f4f.9pWCZ1OmPFLaLfcg%akosela@andykosela.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/25/2010 4:01 PM, Andy Kosela wrote:
> Doug Barton<dougb@FreeBSD.org>  wrote:
>
>> FYI, it's never necessary to do 'cat $file | grep' you can always do
>> 'grep $file' instead.
>>
>> The bit on finding the directory for a port (the ones that start with
>> pwd= in the diff) can also be done a bit more efficiently with this at
>> the beginning:
>>
>> grep -m1 "/$e|" INDEX
>
> Yeah I agree, will incorporate your suggestions into the code.  However
> -m1 option is not useful here as:
>
>   $ grep -m1 "/$tin|" INDEX
>
> lists only zh-tin (first match), where first and foremost we are looking
> for tin.

I did not review the code in depth so if multiple matches are valuable 
to you, then certainly the -m1 option is not relevant. If however you're 
looking for a unique value in the INDEX file (specified as 
category/portname) then it would be.


hth,

Doug

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




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