[PKGNG] where I can find $ABI?

Peter Pentchev roam at ringlet.net
Mon Jan 21 15:35:34 UTC 2013


On Mon, Jan 21, 2013 at 07:13:34PM +0400, Alex Keda wrote:
> 21.01.2013 17:29, Baptiste Daroussin пишет:
> >On Mon, Jan 21, 2013 at 05:08:09PM +0400, Alex Keda wrote:
> >>I create my own repository.
> >>but, $ABI I create as:
> >>v1=`uname -s | tr "[:upper:]" "[:lower:]"`
> >>v2=`uname -r | awk -F '.' '{print $1}'`
> >>v3=x86
> >>v4=`sysctl -n hw.machine_arch | tr -d "[:alpha:]"`
> >>ABI="$v1:$v2:$v3:$v4"
> >>(for example)
> >>
> >>may be add some key to pkg command, for output pkg_get_myabi() result?
> >
> >okg -vv should output you ABI
> >
> >If you want to get the information out of a package pkg info -fF mypkg.txz |
> >grep "^arch:" Should output the ABI for you
> >
> >regards,
> >Bapt
> >
> OK, thanks
> pkg -vv | grep abi | awk '{print $2}'

With the risk of this disintegrating into yet another round of Perl
Golf, you do realize that there is almost never a reason to use grep and
awk one after the other, right? :)

pkg -vv | awk '$1 == "abi:" {print $2}'

G'luck,
Peter

-- 
Peter Pentchev	roam at ringlet.net roam at FreeBSD.org p.penchev at storpool.com
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
I am the thought you are now thinking.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130121/3aed21ce/attachment.sig>


More information about the freebsd-ports mailing list