Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 1 | inherit phosphor-dbus-yaml |
| 2 | |
Patrick Williams | 891b144 | 2020-06-12 06:04:25 -0500 | [diff] [blame] | 3 | LOGGING_YAML_SUBDIRS ??= "${OBMC_ORG_YAML_SUBDIRS}" |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 4 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 5 | do_install:append() { |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 6 | for yaml_d in ${LOGGING_YAML_SUBDIRS} ; |
| 7 | do |
Patrick Williams | 7589c79 | 2023-02-08 12:34:24 -0600 | [diff] [blame] | 8 | if [ -d ${S}/${yaml_d} ]; |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 9 | then |
Patrick Williams | 7589c79 | 2023-02-08 12:34:24 -0600 | [diff] [blame] | 10 | yaml_base=${S} |
| 11 | elif [ -d ${S}/yaml/${yaml_d} ]; |
| 12 | then |
| 13 | yaml_base=${S}/yaml |
| 14 | else |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 15 | continue |
| 16 | fi |
| 17 | |
Patrick Williams | 7589c79 | 2023-02-08 12:34:24 -0600 | [diff] [blame] | 18 | |
| 19 | for yaml_f in $(find ${yaml_base}/${yaml_d} -name "*.errors.yaml" -or \ |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 20 | -name "*.metadata.yaml") ; |
| 21 | do |
Patrick Williams | 7589c79 | 2023-02-08 12:34:24 -0600 | [diff] [blame] | 22 | subpath=$(realpath --relative-to=${yaml_base} ${yaml_f}) |
Patrick Williams | 1f2b9a4 | 2020-06-11 16:56:16 -0500 | [diff] [blame] | 23 | install -d $(dirname ${D}${yaml_dir}/$subpath) |
| 24 | |
| 25 | install -m 0644 ${yaml_f} ${D}${yaml_dir}/$subpath |
| 26 | done |
| 27 | done |
| 28 | } |