Custom Search

Sunday, October 10, 2010

PKG_PATH Tweaking

Saw these on the mailing list a few weeks back.
First example is a bit long and drawn out but it works:

PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -a | \
cut -d” ” -f 3`/packages/`uname -a |cut -d” ” -f 5`/

Second method is a bit neater:
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`arch -s`/

Create an alias in called pkg_find:

alias pkg_find=”echo ls | ftp -a $PKG_PATH |sed ‘s/.*\ //g’ |grep -i ”

Then, from the command prompt, do

$ pkg_find somepkg

and you’ll get the full package name.

Labels:

2 Comments:

Blogger Arabic said...

Cool!, Thanks :)

12/12/2010 05:52:00 PM  
Anonymous Bink said...

pkg_info –Q does the same thing…

1/08/2011 08:02:00 AM  

Post a Comment

Links to this post:

Create a Link

<< Home