determining the how and why of a port dependencies

René J.V. Bertin rjvbertin at gmail.com
Sat Mar 21 12:03:34 PDT 2015


On Saturday March 21 2015 10:46:07 Bradley Giesbrecht wrote:

Hi,

> I use sed in a script and am open to something easier:
> https://svn.macports.org/repository/macports/users/pixilla/scripts/mp-rdeps-grid

Impressive :)

Starting from the end seems a bit simpler, and also should cater for any depth. I haven't (yet) figured out how to *not* replace and then restore the 1st '  ' on each line, but that may not even be possible:

`port -q rdeps "$@" | sed -e '/^-/d' -e 's/   \([^ ]\)/ \| \1/g' -e 's/  /\. /g' -e 's/^\./ /'`

Why do you need the first pattern, removing lines that start with a dash?

R.


More information about the macports-dev mailing list