cvs commit: ports/ports-mgmt/bpkg Makefile
ports/ports-mgmt/bpkg/files bpkg.8 bpkg.sh.in
Doug Barton
dougb at FreeBSD.org
Sun Sep 26 02:40:54 UTC 2010
On 9/25/2010 4:01 PM, Andy Kosela wrote:
> Doug Barton<dougb at 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/
More information about the cvs-all
mailing list