All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] scripts/ld-version.sh: regular expression compile fails
@ 2017-11-08 20:01 Heinrich Schuchardt
  2017-11-08 20:02 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2017-11-08 20:01 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 scripts/ld-version.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index 198580d245..d135882e2c 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -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
 	}
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/1] scripts/ld-version.sh: regular expression compile fails
  2017-11-08 20:01 [U-Boot] [PATCH 1/1] scripts/ld-version.sh: regular expression compile fails Heinrich Schuchardt
@ 2017-11-08 20:02 ` Tom Rini
  2017-11-08 22:44   ` [U-Boot] [PATCH v2 " Heinrich Schuchardt
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2017-11-08 20:02 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 08, 2017 at 09:01:12PM +0100, Heinrich Schuchardt wrote:

> ls --version | scripts/ld-version.sh

... ld? :)

> 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!

-- 
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 1/1] scripts/ld-version.sh: regular expression compile fails
  2017-11-08 20:02 ` Tom Rini
@ 2017-11-08 22:44   ` Heinrich Schuchardt
  2017-11-21 13:05     ` [U-Boot] [U-Boot, v2, " Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2017-11-08 22:44 UTC (permalink / raw)
  To: u-boot

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 <xypron.glpk@gmx.de>
---
v2
	Add license identifier.
	Update commit message.
---
 scripts/ld-version.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index 198580d245..f2be0ff9a7 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -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
 	}
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, v2, 1/1] scripts/ld-version.sh: regular expression compile fails
  2017-11-08 22:44   ` [U-Boot] [PATCH v2 " Heinrich Schuchardt
@ 2017-11-21 13:05     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-11-21 13:05 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 08, 2017 at 11:44:55PM +0100, Heinrich Schuchardt wrote:

> 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 <xypron.glpk@gmx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-21 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 20:01 [U-Boot] [PATCH 1/1] scripts/ld-version.sh: regular expression compile fails Heinrich Schuchardt
2017-11-08 20:02 ` Tom Rini
2017-11-08 22:44   ` [U-Boot] [PATCH v2 " Heinrich Schuchardt
2017-11-21 13:05     ` [U-Boot] [U-Boot, v2, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.