xref: /openbmc/entity-manager/scripts/generate_config_list.sh (revision cfc7f4f423c8163c394fbd777afcaf10a835206f)
1#!/bin/sh
2
3set -eu
4LANG=C
5
6json_files=$(cd configurations; find . -iname "*.json" | sort | sed 's|^\./||')
7
8MESON_FILE=configurations/meson.build
9
10SELF=$(basename "$0")
11
12# Generate the Meson file
13{
14    echo "# This file is auto-generated. Do not edit manually."
15    echo "# File content generated with ${SELF}."
16    echo "configs = ["
17    for file in $json_files; do
18        echo "    '${file}',"
19    done
20    echo "]"
21} > "$MESON_FILE"
22