[U-Boot] [PATCH v4 1/2] tools, config.mk: add binutils-version
Tom Rini
trini at ti.com
Thu Jul 19 17:08:10 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/18/2012 08:11 PM, Mike Frysinger wrote:
> On Wednesday 18 July 2012 19:45:52 Allen Martin wrote:
>> +MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d .
>> -f 1) +MINOR=$($gas --version | head -1 | awk '{print $NF}' |
>> cut -d . -f 2) + +printf "%02d%02d\\n" $MAJOR $MINOR
>
> can be replaced with a single awk script:
>
> $gas --version | awk '{ gsub(/[.]/, " ", $NF) $0 = $NF printf
> "%02d%02d\n", $1, $2 exit }'
That looks much longer and we call this once so a few execs is noise.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJQCCLaAAoJENk4IS6UOR1Wag8P/0/s9VVHGj60Q2MqaJPWST1H
8SVj8SMNBbeG2WHadkY+iB815MoToK+8oz5WMXhDA8PLThXdljBaQgbIjur2xyo5
QXRPFwxk3oIQxiy/fKR9ubt1eg9jJSrnZM6tTdWpOANYeqZo5w9S4MKoUr+mT9cf
FzXIhKOoX9YRxKZsqhMYgTxO85sMg7FUn8OEK3q1GJdbqVF5lSSAKSG/WHDbv3wV
/VIbgskp2OjtOlq1GHtmEQw77d1aYhHkwSKaRiYnFKimez+GeIq++ap9bdt2x7Dn
87THqKfeB62xdID9kCIDf9tUPKeFBf/mN606Vreg6s00DxZOmtn20CW/WErxIdxx
7b6r49KXPKqA553e08BChbopvQEYM9F/5MIkPqEX71ilR8p9WJ56IuJNJNbSMFMZ
YP96niRroVEV8KBk9FAPIqgNVZ40Fz0TCJSurs2ESHBaVlH9ZF9b6YjOXjIulFwa
WImS4xwXcsfV0PzryVxsptX2TEq8t0p9gXt7oKCAjvER8nnGjLz+B7VuNl1avBrC
6xXyBSpXhOMgpTTPleC7ymo9D8NUJFfetDwi2jNVxcnVIT/tiN3eqFWbapdqWeds
pfocE+E2VIZF2g1BizMuUYuPkw/9NJBqp42vS8lr/FVdaePzIOZo/DSDl95/Vlr6
U6BFALNyEJK0WmnXaOIV
=6YIv
-----END PGP SIGNATURE-----
More information about the U-Boot
mailing list