mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-01-27 17:37:18 +01:00
bbfdm: fail installation of invalid json DM
This commit is contained in:
parent
cd3985f432
commit
be2699ad4d
1 changed files with 5 additions and 1 deletions
|
|
@ -94,7 +94,11 @@ bbfdm_install_dm()
|
|||
if [ "${src##*.}" = "json" ]; then
|
||||
echo "Compacting BBFDM JSON file"
|
||||
minfile=$(mktemp)
|
||||
jq -c 'del(..|.description?)' ${src} > ${minfile}
|
||||
if ! jq -c 'del(..|.description?)' ${src} > ${minfile}; then
|
||||
echo "Compression of json input file (${src}) failed"
|
||||
rm "${minfile}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${VENDOR_EXTN}" ]; then
|
||||
sed -i "s/{BBF_VENDOR_PREFIX}/${VENDOR_EXTN}/g" ${minfile}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue