#!/usr/bin/env bash # Downloads the DB-IP Lite country MMDB database for development. # The Nix build fetches this automatically; this script is for local dev only. set -euo pipefail URL="https://download.db-ip.com/free/dbip-country-lite-2026-02.mmdb.gz" DEST="internal/geoip/dbip-country-lite.mmdb" cd "$(git rev-parse --show-toplevel)" if [ -f "$DEST" ]; then echo "GeoIP database already exists at $DEST" exit 0 fi echo "Downloading DB-IP Lite country database..." curl -fSL "$URL" | gunzip > "$DEST" echo "Saved to $DEST"