#!/usr/bin/env bash # SPDX-License-Identifier: AGPL-3.0-only set -euo pipefail root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) test -s "$root/LICENSE" test -s "$root/COPYRIGHT" test -s "$root/examples/LICENSE" while IFS= read -r file; do grep -Fq 'SPDX-License-Identifier: AGPL-3.0-only' "$file" || { echo "missing SPDX identifier: $file" >&2; exit 1; } done < <(find "$root/cmd" "$root/internal" -type f -name '*.go' -print | LC_ALL=C sort) echo "license boundaries verified"