diff --git a/readthedocs.yml b/readthedocs.yml index cc3f461fc7..207c31a23a 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -7,6 +7,7 @@ build: jobs: pre_build: - bst -v export --output src/schema.json + - tools/no-bad-schema-paths.sh src/schema.json # README.md might need fixing mkdocs: configuration: mkdocs.yml diff --git a/tools/no-bad-schema-paths.sh b/tools/no-bad-schema-paths.sh index 6bee4e3dcc..1825036f42 100755 --- a/tools/no-bad-schema-paths.sh +++ b/tools/no-bad-schema-paths.sh @@ -2,6 +2,8 @@ set -eu -o pipefail +schema_json=$(readlink -f "$1") + cd `readlink -f "$0" | xargs dirname`/../src/schema grep -oE '(://)?([-_A-Za-z]+\.)+[-_A-Za-z]+' README.md \ @@ -14,7 +16,7 @@ grep -oE '(://)?([-_A-Za-z]+\.)+[-_A-Za-z]+' README.md \ #echo "$filepath" #ls -ld "$filepath"* || echo "nope" #echo -n "$path: " - v=$(jq ".$p" < ../../../bids-schema/versions/master/schema.json | grep -v '^null$' || :) + v=$(jq ".$p" < "$schema_json" | grep -v '^null$' || :) if [ -z "$v" ]; then echo "$p: not reachable" fi