summaryrefslogtreecommitdiffstats
path: root/scripts/list-defconfigs.sh
blob: eeae9fbfdc308f52659331b0fcc300ca3307c1a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
#
# Output json formatted defconfig list for Github Action consumption

ARCH=${@:-*}

cd arch

archs=$(for arch in $ARCH; do
	ls -1 $arch/configs | xargs -i printf '{ "arch": "%s", "config": "%s" }\n' \
		"$arch" "{}" | paste -sd ',' -
done | paste -sd ',' -)

echo '{ "include" : '" [ $archs ] }"