blob: 0f550cf2181be6a45959e016e525aea346352498 [file] [log] [blame]
Patrick Williams1f2b9a42020-06-11 16:56:16 -05001inherit phosphor-dbus-yaml
2
Patrick Williams891b1442020-06-12 06:04:25 -05003LOGGING_YAML_SUBDIRS ??= "${OBMC_ORG_YAML_SUBDIRS}"
Patrick Williams1f2b9a42020-06-11 16:56:16 -05004
Patrick Williams12fc9392021-08-06 09:16:53 -05005do_install:append() {
Patrick Williams1f2b9a42020-06-11 16:56:16 -05006 for yaml_d in ${LOGGING_YAML_SUBDIRS} ;
7 do
Patrick Williams7589c792023-02-08 12:34:24 -06008 if [ -d ${S}/${yaml_d} ];
Patrick Williams1f2b9a42020-06-11 16:56:16 -05009 then
Patrick Williams7589c792023-02-08 12:34:24 -060010 yaml_base=${S}
11 elif [ -d ${S}/yaml/${yaml_d} ];
12 then
13 yaml_base=${S}/yaml
14 else
Patrick Williams1f2b9a42020-06-11 16:56:16 -050015 continue
16 fi
17
Patrick Williams7589c792023-02-08 12:34:24 -060018
19 for yaml_f in $(find ${yaml_base}/${yaml_d} -name "*.errors.yaml" -or \
Patrick Williams1f2b9a42020-06-11 16:56:16 -050020 -name "*.metadata.yaml") ;
21 do
Patrick Williams7589c792023-02-08 12:34:24 -060022 subpath=$(realpath --relative-to=${yaml_base} ${yaml_f})
Patrick Williams1f2b9a42020-06-11 16:56:16 -050023 install -d $(dirname ${D}${yaml_dir}/$subpath)
24
25 install -m 0644 ${yaml_f} ${D}${yaml_dir}/$subpath
26 done
27 done
28}