public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Pau Monne <royger@FreeBSD.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] scripts/check-config.sh: fix to be compatible with BSD sed
Date: Sat, 13 Feb 2021 11:06:31 +0100	[thread overview]
Message-ID: <20210213100632.6249-2-royger@FreeBSD.org> (raw)
In-Reply-To: <20210213100632.6249-1-royger@FreeBSD.org>

Fist use extended regexp in order to drop the '\' around the
parentheses which is not supported by BSD sed in regular mode.

Secondly use [[:blank:]] instead of \s, as the later is a GNU
extension.

No functional change intended.

Signed-off-by: Roger Pau Monn? <royger@FreeBSD.org>
---
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
---
 scripts/check-config.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/check-config.sh b/scripts/check-config.sh
index 583f7d0963..cc1c9a54d9 100755
--- a/scripts/check-config.sh
+++ b/scripts/check-config.sh
@@ -39,14 +39,14 @@ new_adhoc="${path}.adhoc"
 export LC_ALL=C
 export LC_COLLATE=C
 
-cat ${path} |sed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \
+cat ${path} |sed -nr 's/^#define (CONFIG_[A-Za-z0-9_]*).*/\1/p' |sort |uniq \
 	>${configs}
 
 comm -23 ${configs} ${whitelist} > ${suspects}
 
-cat `find ${srctree} -name "Kconfig*"` |sed -n \
-	-e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
-	-e 's/^\s*menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
+cat `find ${srctree} -name "Kconfig*"` |sed -nr \
+	-e 's/^[[:blank:]]*config *([A-Za-z0-9_]*).*$/CONFIG_\1/p' \
+	-e 's/^[[:blank:]]*menuconfig ([A-Za-z0-9_]*).*$/CONFIG_\1/p' \
 	|sort |uniq > ${ok}
 comm -23 ${suspects} ${ok} >${new_adhoc}
 if [ -s ${new_adhoc} ]; then
-- 
2.30.1

  reply	other threads:[~2021-02-13 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 10:06 [PATCH 0/2] Fixes for BSD sed compatibility Roger Pau Monne
2021-02-13 10:06 ` Roger Pau Monne [this message]
2021-02-13 16:42   ` [PATCH 1/2] scripts/check-config.sh: fix to be compatible with BSD sed Warner Losh
2021-02-18  4:45   ` Simon Glass
2021-02-25 13:25   ` Tom Rini
2021-02-13 10:06 ` [PATCH 2/2] build/DTC: fix sed usage in DTC command Roger Pau Monne
2021-02-13 16:43   ` Warner Losh
2021-02-22  9:17   ` Roger Pau Monné
2021-02-25 13:25   ` Tom Rini

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=20210213100632.6249-2-royger@FreeBSD.org \
    --to=royger@freebsd.org \
    --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