use another for each method and check for device

Signed-off-by: Marek Küthe <m.k@mk16.de>
This commit is contained in:
Marek Küthe 2023-01-29 13:41:41 +01:00
parent 246492fce6
commit 76d3b6eaa2
No known key found for this signature in database
GPG Key ID: 7E869146699108C7
1 changed files with 6 additions and 6 deletions

12
test.sh
View File

@ -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