mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! kbuild: add support for merged defconfigs
@ 2024-05-21 19:09 Ahmad Fatoum
  0 siblings, 0 replies; only message in thread
From: Ahmad Fatoum @ 2024-05-21 19:09 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-21 19:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21 19:09 [PATCH] fixup! kbuild: add support for merged defconfigs Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox