From owner-cvs-ports@FreeBSD.ORG Sun Sep 26 02:40:52 2010 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C72C106564A for ; Sun, 26 Sep 2010 02:40:52 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 282AE8FC15 for ; Sun, 26 Sep 2010 02:40:51 +0000 (UTC) Received: (qmail 25063 invoked by uid 399); 26 Sep 2010 02:40:51 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 26 Sep 2010 02:40:51 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C9EB2B4.8090709@FreeBSD.org> Date: Sat, 25 Sep 2010 19:40:52 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: akosela@andykosela.com References: <201009251455.o8PEtSxM036322@repoman.freebsd.org> <4C9E70E3.3000004@FreeBSD.org> <4c9e7f4f.9pWCZ1OmPFLaLfcg%akosela@andykosela.com> In-Reply-To: <4c9e7f4f.9pWCZ1OmPFLaLfcg%akosela@andykosela.com> X-Enigmail-Version: 1.2a1pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 02:40:52 -0000 On 9/25/2010 4:01 PM, Andy Kosela wrote: > Doug Barton 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/