mirror of https://codeberg.org/CRXN/entitydb.git
use another for each method and check for device
Signed-off-by: Marek Küthe <m.k@mk16.de>
This commit is contained in:
parent
246492fce6
commit
76d3b6eaa2
12
test.sh
12
test.sh
|
@ -8,16 +8,16 @@ if ! jq --version &> /dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
while read -r l
|
|
||||||
do
|
for file in *.json; do
|
||||||
if ! jq --exit-status '.route | .[] | .description' < "$l" > /dev/null 2>&1
|
if ! jq --exit-status '.route | .[] | .device' < "$file" > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "$l is invalid." >&2
|
echo "$file is invalid." >&2
|
||||||
ret=1
|
ret=1
|
||||||
else
|
else
|
||||||
#echo "$l is valid."
|
#echo "$file is valid."
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
done < <(find "$PWD" -name '*.json' -type f)
|
done
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|
Loading…
Reference in New Issue