提交 b6b1b445 编写于 作者: B Bill Pringlemeir 提交者: Tom Rini

scripts: fix binutils-version.sh for 'as' without a package.

Commit 73c25753 fixed the common issue that binutil packages (tool/organization
that packaged or built the bin-utils) are included in brackets and this may
falsely be recognized as a version.  However, some tools do not provide a
'package' and previously we add the 'Gnu assembler..' to the version.

Strip out the '(package version text)' and then look for a ##.## string.
Signed-off-by: NBill Pringlemeir <bpringlemeir@nbsps.com>
Tested-by: NMasahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: NHans de Goede <hdegoede@redhat.com>
上级 b4ad44ba
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册