#!/usr/bin/env bash
set -eu

which wd > /dev/null || {
  echo "requires to have https://www.npmjs.com/package/wikibase-cli installed, either globally or just in this repo"
  echo "(it is not installed as a dev dependency as the use made of it is not worth the subdependencies maintainance)"
  exit 1
}

wd sparql ./scripts/queries/all_properties_datatypes.rq --json > /tmp/all_wikidata_datatypes.json
./scripts/compare_datatypes
