Create tgz packages

Parv parv at pair.com
Sun Jan 9 14:04:22 PST 2005


in message <20050109194634.GA275 at holestein.holy.cow>,
wrote Parv thusly...
>
> in message <pan.2005.01.09.15.57.31.78757 at carebears.mine.nu>,
> wrote Christer Solskogen thusly...
> >
> > Is there a easy way of making packages of all installed ports?
> 
> assuming sh ...
> 
>   for port in $( find  /var/db/pkg -mindepth 1 -type d )
>   do
>     echo pkg_create -b $(basename "$port")
      ^ ^ ^ ^ ^ ^ ^ ^
      ^ ^ ^ ^ ^ ^ ^ ^
Oops, forgot to undo the echo after testing; please remove it when
one is ready to create the packages.


>   done


Below is another way ...

  find  /var/db/pkg -mindepth 1 -type d  \
  | while read port
    do
      pkg_create -b $(basename "$port")
    done



  - Parv

-- 



More information about the freebsd-questions mailing list