[U-Boot] [PATCH v4 1/2] tools, config.mk: add binutils-version

Mike Frysinger vapier at gentoo.org
Thu Jul 19 05:11:13 CEST 2012


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
}'
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/5e6e9409/attachment.pgp>


More information about the U-Boot mailing list