diff options
author | Stefano Babic <sbabic@denx.de> | 2014-12-30 13:04:09 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-12-30 13:04:38 +0100 |
commit | 4e0114d9679173cfe8bfaffb8b4fb4bbf8cdaa10 (patch) | |
tree | 2a909fd0434753a0e5b252afcda5aeb23f21ac26 /scripts/binutils-version.sh | |
parent | 7ae350a0305de592faa8903255c988d4e6afb194 (diff) | |
parent | 125738e819a3b9d15210794b3dcef9f4d9bcf866 (diff) | |
download | u-boot-imx-4e0114d9679173cfe8bfaffb8b4fb4bbf8cdaa10.zip u-boot-imx-4e0114d9679173cfe8bfaffb8b4fb4bbf8cdaa10.tar.gz u-boot-imx-4e0114d9679173cfe8bfaffb8b4fb4bbf8cdaa10.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'scripts/binutils-version.sh')
-rwxr-xr-x | scripts/binutils-version.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/binutils-version.sh b/scripts/binutils-version.sh index d4d9eb4..0bc26cf 100755 --- a/scripts/binutils-version.sh +++ b/scripts/binutils-version.sh @@ -14,7 +14,9 @@ if [ ${#gas} -eq 0 ]; then exit 1 fi -MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 1) -MINOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 2) +version_string=$($gas --version | head -1 | sed -e 's/.*) *\([0-9.]*\).*/\1/' ) + +MAJOR=$(echo $version_string | cut -d . -f 1) +MINOR=$(echo $version_string | cut -d . -f 2) printf "%02d%02d\\n" $MAJOR $MINOR |