mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! kbuild: add support for merged defconfigs
Date: Tue, 21 May 2024 21:09:17 +0200	[thread overview]
Message-ID: <20240521190917.3074367-1-a.fatoum@pengutronix.de> (raw)

scripts: list-defconfigs.sh: remove interleaves new lines from output

Github actions apparently chokes on new lines in the middle of the JSON,
so let's avoid them.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/list-defconfigs.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/list-defconfigs.sh b/scripts/list-defconfigs.sh
index d7516425f8e3..5eaaab51cc61 100755
--- a/scripts/list-defconfigs.sh
+++ b/scripts/list-defconfigs.sh
@@ -4,12 +4,13 @@
 # Output json formatted defconfig list for Github Action consumption
 ARCH=${@:-$(for a in arch/*/; do basename $a; done)}
 
-echo '{ "include" : [ '
+# Github chokes on interleaved new lines, thus use printf
+printf '{ "include" : [ '
 for arch in $ARCH; do
 	make ARCH=$arch CROSS_COMPILE= help | \
 		awk '/_defconfig/ { print $1  }' | \
 		xargs -i printf '{ "arch": "%s", "config": "%s" }\n' \
 		"$arch" "{}" | \
 		paste -sd ',' -
-done | paste -sd ',' -
+done | paste -sd ',' - | tr -d '\n'
 echo '] }'
-- 
2.39.2




                 reply	other threads:[~2024-05-21 19:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240521190917.3074367-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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