scripts/ld-version.sh: regular expression compile fails
PATCH 1/1 scripts/ld-version.sh: regular expression compile fails
ls --version | scripts/ld-version.sh
fails with
awk: scripts/ld-version.sh:
line 4: regular expression compile failed (missing '(') .*)
So let's refresh the script with the current Linux kernel version.
--- scripts/ld-version.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/ld-version.sh +4 -2
@@ -1,8 +1,10 @@ #!/usr/bin/awk -f # extract linker version number from stdin and turn into single number { - gsub(".*)", ""); + gsub(".*\\)", ""); + gsub(".*version ", ""); + gsub("-.*", ""); split($1,a, "."); - print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5]; + print a[1]*100000000 + a[2]*1000000 + a[3]*10000; exit }
Signature · 1 line
2.14.2
PATCH 1/1 scripts/ld-version.sh: regular expression compile fails
Quoted 1 line · Heinrich Schuchardt
ls --version |
scripts/ld-version.sh
... ld? :)
Quoted 7 lines
fails with
awk:scripts/ld-version.sh:
line 4: regular expression compile failed (missing '(') .*)So let's refresh the script with the current Linux kernel version.
Please specify tag or git-hash not just "current", for ease of future re-syncs, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171108/c6d78069/attachment.sig>
PATCH v2 1/1 scripts/ld-version.sh: regular expression compile fails
ld --version | scripts/ld-version.sh
fails with
awk: scripts/ld-version.sh:
line 4: regular expression compile failed (missing '(') .*)
So let's refresh the script from Linux kernel v4.14-rc8.
---
v2
Add license identifier.
Update commit message.
--- scripts/ld-version.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
scripts/ld-version.sh +5 -2
@@ -1,8 +1,11 @@ #!/usr/bin/awk -f +# SPDX-License-Identifier: GPL-2.0 # extract linker version number from stdin and turn into single number { - gsub(".*)", ""); + gsub(".*\\)", ""); + gsub(".*version ", ""); + gsub("-.*", ""); split($1,a, "."); - print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5]; + print a[1]*100000000 + a[2]*1000000 + a[3]*10000; exit }
Signature · 1 line
2.14.2
PATCH v2 1/1 scripts/ld-version.sh: regular expression compile fails
Quoted 9 lines · Heinrich Schuchardt
ld --version |
scripts/ld-version.sh
fails with
awk:scripts/ld-version.sh:
line 4: regular expression compile failed (missing '(') .*)So let's refresh the script from Linux kernel v4.14-rc8.
Signed-off-by Heinrich Schuchardt <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171121/ebd7c8e1/attachment.sig>