|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
/pkg/ question, also a *very* useful one-liner
Code:
#/# find /var/db/pkg -type d -name "p5*" | xargs -J % find -type f -name "+CONTENTS" -exec grep -H "5.12" {} \; | grep pm | head -40 | gtr -s \/ "\n" | grep p5 | sort | uniq | xargs -J % portmaster -d -B -P -i -g % && yell || yell
__________________
FreeBSD 13-STABLE |
|
|||
A good one for this website: http://www.commandlinefu.com/
|
|
|||
Not to change the topic too much, but this post is similar.
I wanted a way to check if the ports that weren't building here, yet, were packages upstream. Yesterday I found an older perl script onhand that I used just a part of. Still very beta in the first usage (below) vs the second. I'm still a very novice perl programmer, working from others' scripts mostly. Code:
#!/usr/local/bin/perl --q # usage: cat pkg_version.log | grep -v zsh |grep -v (succ , fail, nvi, ) | xargs -J % % perl pl_pp.pl % # ... sort of buggy. Halts often # 2nd usage: perl pl_pp.pl www/libxul www/firefox devel/boost-libs use strict; use warnings; use diagnostics; Main( @ARGV ); exit( 0 ); sub Main { for my $bsdport ( @_ ) { system(" portmaster -PP $bsdport " ) or die $!; # Fudge ( $dir, glob '*' ); } } sub Fudge { # some code I removed from the upstream code from perlmonks.org }
__________________
FreeBSD 13-STABLE |
Tags |
one-liner, perl, pkg |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PF question | bug0r | OpenBSD Security | 7 | 23rd November 2009 03:54 PM |
external drive partition question + fdisk question | gosha | OpenBSD General | 15 | 15th June 2009 02:00 PM |
DR-DOS question | RJPugh | Other OS | 4 | 31st May 2009 11:10 AM |
Question about Mac OS X SLA | nfries88 | Other BSD and UNIX/UNIX-like | 9 | 1st January 2009 09:05 PM |
Question about DNS. | bigb89 | FreeBSD General | 10 | 22nd May 2008 06:08 AM |