Mercurial > hg > piper
view json/check.sh @ 212:d62a69f8d649
Or, we could do this only for Linux since the OSX build should be more
up-to-date?
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 09 Aug 2018 10:45:25 +0100 |
parents | 549d3d44d729 |
children |
line wrap: on
line source
#!/bin/bash mydir=$(dirname "$0") set -eu echo for ex in "$mydir"/examples/*.json ; do echo "Checking $ex..." 1>&2 jsonschema -i "$ex" "$mydir"/schema/$(basename "$ex" | sed 's/-[^.]*//') done for s in "$mydir"/schema/*.json ; do if [ ! -f "$mydir"/examples/$(basename "$s") ]; then if ! ls -1 "$mydir"/examples/$(basename "$s" .json)-*.json >/dev/null 2>&1; then echo "WARNING: No example file for schema $s" fi fi done echo OK