Create tgz packages
Parv
parv at pair.com
Wed Jan 12 19:32:47 PST 2005
in message <20050109220353.GB275 at holestein.holy.cow>,
wrote Parv thusly...
>
> find /var/db/pkg -mindepth 1 -type d \
^ ^ ^ ^ ^ ^
^ ^ ^ ^ ^ ^
> | while read port; do pkg_create -b $(basename "$port"); done
I made a gross mistake in my above reply related to "-mindepth"
option of find(1). I wanted to find all the directories in
/var/db/pkg w/o recursion in the directories found. From find(1)
...
-mindepth n
Always true; do not apply any tests or actions at levels less than
n. If any -mindepth primary is specified, it applies to the
entire expression even if it would not normally be evaluated.
-mindepth 1 processes all but the command line arguments.
If there happened to be a sub-directory -- not the case right now --
in one of the ports, then it too would have been passed to the
pkg_create(1) command given the quoted text above. Same problem
exits in my previous reply in this thread.
"-mindepth" needs to be changed to "-maxdepth", as in ...
find /var/db/pkg -maxdepth 1 -type d \
| while read port; do pkg_create -b $(basename "$port"); done
- Parv
--
More information about the freebsd-questions
mailing list