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
|
||||
|
||||
ret=0
|
||||
while read -r l
|
||||
do
|
||||
if ! jq --exit-status '.route | .[] | .description' < "$l" > /dev/null 2>&1
|
||||
|
||||
for file in *.json; do
|
||||
if ! jq --exit-status '.route | .[] | .device' < "$file" > /dev/null 2>&1
|
||||
then
|
||||
echo "$l is invalid." >&2
|
||||
echo "$file is invalid." >&2
|
||||
ret=1
|
||||
else
|
||||
#echo "$l is valid."
|
||||
#echo "$file is valid."
|
||||
:
|
||||
fi
|
||||
done < <(find "$PWD" -name '*.json' -type f)
|
||||
done
|
||||
|
||||
exit $ret
|
||||
|
|
Loading…
Reference in New Issue