From: Simon Glass <sjg@chromium.org>
Date: Sun, 7 Aug 2022 13:12:19 +0000 (-0600)
Subject: arm: k3: Correct an awk warning
X-Git-Tag: v2025.01-rc5-pxa1908~1308^2~2
X-Git-Url: http://git.dujemihanovic.xyz/img/static//%22brlog.php?a=commitdiff_plain;h=cc0b36536b8ffe89293930934439c8148afa075c;p=u-boot.git

arm: k3: Correct an awk warning

The k3_gen_x509_cert.sh script produced this warning on gitlab and also
on my machine, e.g. with j7200_evm_r5:

awk: cmd. line:1: warning: regexp escape sequence `\ ' is not a known
   regexp operator

There is no need to escape spaces, so drop the backslashes. Also split
the line so it is a more reasonable length.

This script should really be deleted and binman used instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/k3_gen_x509_cert.sh b/tools/k3_gen_x509_cert.sh
index 24cfc4e5fb..029247c105 100755
--- a/tools/k3_gen_x509_cert.sh
+++ b/tools/k3_gen_x509_cert.sh
@@ -88,7 +88,10 @@ EOF
 }
 
 parse_key() {
-	sed '/\ \ \ \ /s/://g' key.txt | awk  '!/\ \ \ \ / {printf("\n%s\n", $0)}; /\ \ \ \ / {printf("%s", $0)}' | sed 's/\ \ \ \ //g' | awk "/$1:/{getline; print}"
+	sed '/    /s/://g' key.txt | \
+            awk  '!/    / {printf("\n%s\n", $0)}; /    / {printf("%s", $0)}' | \
+            sed 's/    //g' | \
+            awk "/$1:/{getline; print}"
 }
 
 gen_degen_key() {