From: Bill Pringlemeir <bpringlemeir@nbsps.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] scripts: fix binutils-version.sh for 'as' without a package.
Date: Wed, 07 Jan 2015 10:42:47 -0500 [thread overview]
Message-ID: <87k30y7g20.fsf@nbsps.com> (raw)
In-Reply-To: <20150107210129.B9C2.AA925319@jp.panasonic.com> (Masahiro Yamada's message of "Wed, 07 Jan 2015 21:01:29 +0900")
On 7 Jan 2015, yamada.m at jp.panasonic.com wrote:
> Thanks for your patch.
>
> I think this works but could it be more simplified?
>
> In your commit-log, you mentioned only some of tools provide
> additional information surrounded by brackets.
>
> If so, we can
> [1] remove blackets
> [2] and then take the first word that consists of numbers+period
>
>
> Like this:
>
> version_string=$($gas --version | head -1 | \
> sed -e 's/(.*)//' -e 's/[^0-9.]*\([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
I realized I didn't need to spawn sed twice, but removing the
'(package)' stuff seems better. Thanks for giving me a reason to fix
the whitespace.
Also the string,
GNU assembler version 2.24.0-6.fc21 20140613
Was originally reporting '2014061320140613' prior to your version. The
new version reports '0224' like all the others.
Fwiw,
Bill.
prev parent reply other threads:[~2015-01-07 15:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-30 10:55 [U-Boot] v2015.01-rc4 REGRESSION: "scripts: fix binutils-version.sh" breaks things for non Linaro toolchains Hans de Goede
2014-12-30 13:50 ` Tom Rini
2015-01-06 10:27 ` Hans de Goede
2015-01-06 15:46 ` Tom Rini
2015-01-06 21:32 ` Bill Pringlemeir
2015-01-06 22:01 ` Bill Pringlemeir
2015-01-06 22:07 ` Tom Rini
2015-01-06 22:25 ` [U-Boot] [PATCH] scripts: fix binutils-version.sh for 'as' without a package Bill Pringlemeir
2015-01-06 22:38 ` Bill Pringlemeir
2015-01-07 12:01 ` Masahiro Yamada
2015-01-07 15:34 ` [U-Boot] [PATCH v3] " Bill Pringlemeir
2015-01-08 8:56 ` Masahiro Yamada
2015-01-08 10:18 ` Hans de Goede
2015-01-09 13:34 ` [U-Boot] [U-Boot, " Tom Rini
2015-01-07 15:42 ` Bill Pringlemeir [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k30y7g20.fsf@nbsps.com \
--to=bpringlemeir@nbsps.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox