From owner-freebsd-ports@FreeBSD.ORG Thu Aug 22 01:20:07 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D337D188 for ; Thu, 22 Aug 2013 01:20:07 +0000 (UTC) (envelope-from jankyj@unfs.us) Received: from morbid.purplehat.org (morbid.purplehat.org [206.225.82.173]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B292A2EB2 for ; Thu, 22 Aug 2013 01:20:07 +0000 (UTC) Received: from localhost (morbid.purplehat.org [206.225.82.173]) by morbid.purplehat.org (Postfix) with ESMTP id 74256D8CF87 for ; Wed, 21 Aug 2013 18:14:09 -0700 (MST) Received: from morbid.purplehat.org ([206.225.82.173]) by localhost (morbid.purplehat.org [206.225.82.173]) (maiad, port 10024) with ESMTP id 81727-04 for ; Wed, 21 Aug 2013 18:14:08 -0700 (MST) Received: from [192.168.1.3] (mx2.purplehat.org [24.8.6.185]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jankyj@unfs.us) by morbid.purplehat.org (Postfix) with ESMTPSA id BFDD6D8CF86 for ; Wed, 21 Aug 2013 18:14:08 -0700 (MST) Message-ID: <521565E0.10702@unfs.us> Date: Wed, 21 Aug 2013 19:14:08 -0600 From: Janky Jay User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: Searching the port tree with portmaster? References: <090F0843-3C20-4B32-8670-C990FA4579BA@kreme.com> <20130815161241.GG1520@spamcop.net> <20130816083531.5e70c7ce@laptop.minsk.domain> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 01:20:07 -0000 Call it "sport" (search ports). :) On 08/16/2013 02:33 AM, Torfinn Ingolfsen wrote: > On Fri, Aug 16, 2013 at 7:35 AM, Sergey V. Dyatko > wrote: >> 2 aliases from my .cshrc: >> >> alias search_name "make -C /usr/ports/ search name='\!*' >> display=name,path,info" >> >> alias search_key "make -C /usr/ports/ search key='\!*' >> display=name,path,info" >> >> search_[name|key] smthng > > And a sh script solution, in case it is of use to someone: > > tingo@kg-core1$ pinfo pinfo - find a given port in /usr/ports Use > with 'pinfo xxx', where xxx is the name of the port. > > It looks like this: > > tingo@kg-core1$ more `which pinfo` #!/bin/sh # @(#)port 1.0 > 10-nov-2001 T. Ingolfsen / KG4, Norway # # Just a quick hack to > get any easier way to search for ports # NAME=`basename ${0}` > PORTNAME="${1}" PORTSDIR="/usr/ports" > > if [ "$1" = "" ]; then echo " ${NAME} - find a given port in > /usr/ports" echo " Use with '${NAME} xxx', where xxx is the name > of the port." else if [ ! -d ${PORTSDIR} ]; then echo " ERROR: > ${PORTSDIR} doesn't exist!" exit 0 fi cd ${PORTSDIR} make search > name=${PORTNAME} fi (yes, it was originally called "port", but at > some point in time it conflicted with a port I installed, thus I > renamed it "pinfo") HTH >