View Single Post
  #1   (View Single Post)  
Old 26th February 2015
jb_daefo jb_daefo is offline
Spam Deminer
 
Join Date: May 2008
Posts: 303
Default FreeBSD v10 pkg upgrade with pipe example -- works good

Saves a lot of time vs ports.
Code:
script weekly_thu_upgrade pkg upgrade
One answers "n" , result is a file
Code:
grep p5 weekly_thu_upgrade | sed 's/:/ /g' | awk '{print $1}' |  grep -v mous | xargs -J % pkg install %
One greps out ports that pull in unwanted dependencies to build manually.
A second run with "pkg install -y" actually does the command, as the pipe in the code example is non-interactive and assumes NO.

Many more aspects to this weekly upgrade and a few unmentioned steps (editing out extra lines from the first file result in the first code block above etc) but may be useful to some readers of this post or thread.
Sorry no time to include more useful information.
A few suggestions here to make pkg more robust but not the venue...

edit:
the grep can be changed to//replaced with a "head -10 " "head -30" "head -50" sequence also...
__________________
FreeBSD 13-STABLE

Last edited by jb_daefo; 26th February 2015 at 03:14 PM. Reason: grep > sed possible.
Reply With Quote