Date: Fri, 16 Aug 2013 10:33:10 +0200 From: Torfinn Ingolfsen <tingox@gmail.com> To: FreeBSD Ports ML <freebsd-ports@freebsd.org> Subject: Re: Searching the port tree with portmaster? Message-ID: <CAJ_iqta_Yn8=CEUCymh2aHgaYCtqkaZuA0rP34HMJaFbBq=Y0Q@mail.gmail.com> In-Reply-To: <20130816083531.5e70c7ce@laptop.minsk.domain> References: <F190CCA1-DF98-4EEA-8C14-E5AC3BC86AF0@kreme.com> <CA%2BtpaK1QS=dhgkWsJCq2nM8%2BgPbMTO4jXxoRSK5yorDJCMXHmQ@mail.gmail.com> <090F0843-3C20-4B32-8670-C990FA4579BA@kreme.com> <20130815161241.GG1520@spamcop.net> <20130816083531.5e70c7ce@laptop.minsk.domain>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 16, 2013 at 7:35 AM, Sergey V. Dyatko <sergey.dyatko@gmail.com> 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 -- Regards, Torfinn Ingolfsen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ_iqta_Yn8=CEUCymh2aHgaYCtqkaZuA0rP34HMJaFbBq=Y0Q>