in message <[EMAIL PROTECTED]>, wrote Adam thusly...
>
> For each installed port that has NO other installed ports
> dependent on it, output the full name of the port
> 
> In other words, I want a script to generate the list of ports that
> can be deinstalled without forcing (-f).

What you need is to check if '+REQUIRED_BY' file exists.  (For finer
control, also check if it is empty or not.)  If file does not exist
(or is empty), then there is no registered dependency.

  #!/bin/sh
  pkgdb=/var/db/pkg

  for p in $pkgdb/*
  do
    [ -f "$p/+REQUIRED_BY" ] || { echo "$p" | sed -e "s!^$pkgdb/!!" ; }
  done


  - Parv

-- 
A programmer, budding Unix system administrator, and amateur photographer
ISO employment.  Details...

  http://www103.pair.com/parv/work/

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to