scripts: auto-generate list of schemas
Since the list of schemas is growing and we already have a directory, it
does not need to be updated manually. Make a script for it and check
that that's been done in CI.
Tested: Using 'meson install', check that schemas are installed like
before.
Script works and updates the files as expected.
Change-Id: Ia1b3d99890477c4077e8e3a52a5338805d810440
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/scripts/generate_config_list.sh b/scripts/generate_config_list.sh
index 267e872..5545943 100755
--- a/scripts/generate_config_list.sh
+++ b/scripts/generate_config_list.sh
@@ -1,21 +1,7 @@
#!/bin/sh
set -eu
-LANG=C
-json_files=$(cd configurations; find . -iname "*.json" | sort | sed 's|^\./||')
+self=$(basename "$0")
-MESON_FILE=configurations/meson.build
-
-SELF=$(basename "$0")
-
-# Generate the Meson file
-{
- echo "# This file is auto-generated. Do not edit manually."
- echo "# File content generated with ${SELF}."
- echo "configs = ["
- for file in $json_files; do
- echo " '${file}',"
- done
- echo "]"
-} > "$MESON_FILE"
+./scripts/generate_meson_array.sh configurations configs "${self}"