X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=scripts%2Fbinutils-version.sh;h=a34368184f9ce8875e40b95bbb542f1507151e1c;hb=f916757300;hp=0bc26cf92508b193e6fae49619555d9ecf0cb4ba;hpb=a74a4a86a53726ba17de8ab863bec1cd60cf545e;p=u-boot diff --git a/scripts/binutils-version.sh b/scripts/binutils-version.sh index 0bc26cf925..a34368184f 100755 --- a/scripts/binutils-version.sh +++ b/scripts/binutils-version.sh @@ -14,7 +14,8 @@ if [ ${#gas} -eq 0 ]; then exit 1 fi -version_string=$($gas --version | head -1 | sed -e 's/.*) *\([0-9.]*\).*/\1/' ) +version_string=$($gas --version | head -1 | \ + sed -e 's/(.*)//; s/[^0-9.]*\([0-9.]*\).*/\1/') MAJOR=$(echo $version_string | cut -d . -f 1) MINOR=$(echo $version_string | cut -d . -f 2)