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

cd -- "$(dirname -- "$0")"

test -f site/index.html
test -f site/data/catalog.json
test -f site/data/raw/index.json
test -d site/assets

station_count="$(find site/data/stations -maxdepth 1 -type f -name '*.json' | wc -l | tr -d ' ')"
raw_count="$(find site/data/raw -type f -name '*.bin' | wc -l | tr -d ' ')"

test "$station_count" -eq 106
test "$raw_count" -eq 1403

echo "Paquete correcto: 106 estaciones y 1403 bloques anuales de observaciones."
