Date: Sun, 24 Feb 2002 00:44:35 -0600 From: "Mike Meyer" <mwm-dated-1014965076.54b56d@mired.org> To: "Joe & Fhe Barbish" <barbish@a1poweruser.com> Cc: questions@freebsd.org Subject: Re: How to list port dependencies Message-ID: <15480.35795.543145.356610@guru.mired.org> In-Reply-To: <72832603@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe & Fhe Barbish <barbish@a1poweruser.com> types: > I want to list the path to the makefiles for all the > dependencies of a selected port. > > Is there a command to do this? No, but it makes a cute shell scripting problem. First, make sure your /usr/ports/INDEX file is up to date by doing a "make INDEX" in that directory - or "portsdb" -uU if you're using portupgrade - then run the following shell script in the selected ports directory: for pkg in `(make pretty-print-build-depends-list; make pretty-print-run-depends-list) | sed -e 's/.*) "//' -e 's/".*//'` do awk -F\| "/^$pkg\|/ { print \$2 } " /usr/ports/INDEX done | sed 's/$/Makefile/' This version works in /bin/sh. My first version didn't, as the nested command list caused the $( ... ) construct to fail. Probably another parsing bug in /bin/sh. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15480.35795.543145.356610>