Skip to content
Snippets Groups Projects
Commit 73c25753 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

scripts: fix binutils-version.sh


The current binutils-version.sh expects the version string at the end
of the first line.  It turned out to not work with Linaro toolchain:
It has "Linaro 2014.09" at the back.

To fix this issue, let's parse the word right after the close
parenthesis.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: default avatarYork Sun <yorksun@freescale.com>
Acked-by: default avatarDirk Behme <dirk.behme@gmail.com>
parent 914627fe
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,9 @@ if [ ${#gas} -eq 0 ]; then ...@@ -14,7 +14,9 @@ if [ ${#gas} -eq 0 ]; then
exit 1 exit 1
fi fi
MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 1) version_string=$($gas --version | head -1 | sed -e 's/.*) *\([0-9.]*\).*/\1/' )
MINOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 2)
MAJOR=$(echo $version_string | cut -d . -f 1)
MINOR=$(echo $version_string | cut -d . -f 2)
printf "%02d%02d\\n" $MAJOR $MINOR printf "%02d%02d\\n" $MAJOR $MINOR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment