Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2013 17:35:25 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Alex Keda <admin@lissyara.su>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: [PKGNG] where I can find $ABI?
Message-ID:  <20130121153525.GA5908@straylight.m.ringlet.net>
In-Reply-To: <50FD5B1E.3030001@lissyara.su>
References:  <50FD3DB9.7070103@lissyara.su> <20130121132859.GB7122@ithaqua.etoilebsd.net> <50FD5B1E.3030001@lissyara.su>

next in thread | previous in thread | raw e-mail | index | archive | help

--zYM0uCDKw75PZbzx
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 21, 2013 at 07:13:34PM +0400, Alex Keda wrote:
> 21.01.2013 17:29, Baptiste Daroussin =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> >On Mon, Jan 21, 2013 at 05:08:09PM +0400, Alex Keda wrote:
> >>I create my own repository.
> >>but, $ABI I create as:
> >>v1=3D`uname -s | tr "[:upper:]" "[:lower:]"`
> >>v2=3D`uname -r | awk -F '.' '{print $1}'`
> >>v3=3Dx86
> >>v4=3D`sysctl -n hw.machine_arch | tr -d "[:alpha:]"`
> >>ABI=3D"$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.t=
xz |
> >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 =3D=3D "abi:" {print $2}'

G'luck,
Peter

--=20
Peter Pentchev	roam@ringlet.net roam@FreeBSD.org p.penchev@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.

--zYM0uCDKw75PZbzx
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQ/WA4AAoJEGUe77AlJ98TmLsP/2SEdneP82XatAUaovaTDxhS
czoSkBS/YsoOfjwVXkmPJxrZczG4h7BZLu6lh/90uUalbmXj2f6SoNMKx/W3GStd
/zfwaeV73Mj7izM2NLpDUB56VK9X17z/uNY8zj/hYHC2IHTvw95FLX96gJlNKkP5
rASZnWNMe+bccqfB4B0jN3X7CVdQT1lHXwgMM8nd00lXHMli+6b/WggIwlygbxl5
kQsahLyVZk66SHOQrvfGPkB+jQSwn+SNyeJK0s5BiEpPazBsG99hjAtA7ib1tBzZ
oPTfafOOfkPpFQpNJDG4Sw64afyp9i6v2/ido6uKURib0lQ9dolOHO8PQawsoQfS
i+DtUWmF+ja4oQ/0XduHUOTn5e0pbvv83wIqChjx9KkFxbcIdAvdrWmTcPpmed6j
xycWJjHfnbW3ANCDux5GMdL6mPzW5uj4SHS3GGzBPEubrf1rjRpX8S4u9s0t/9e4
3bVjwlRcNABP7MTwQpqE1/094vKtpvS6RpI0ZR6TzY8lDL4Uu/yxLVQy0YpRLMCA
9NGfgirMO6GzHAITdtUhUOQrP2hNc64ORJVdzCafU/CaYfQmkDy8M6TwRM0vcLJ6
Bjjm9dAflDOkdXxpoq7XT2e7XnqJbD20Q+4CynVGsEZFXWNjpt6uFMZZdhWxqQM4
+5RZg/ukIgyo9LzLjrQz
=8sLR
-----END PGP SIGNATURE-----

--zYM0uCDKw75PZbzx--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130121153525.GA5908>