22 lines
722 B
Bash
22 lines
722 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
DOC_PATH="${1:-KISC-merkarhitektura-apraksts.md}"
|
|
|
|
if [ ! -f "$DOC_PATH" ]; then
|
|
echo "ERROR: regenerated doc not found: $DOC_PATH"
|
|
exit 1
|
|
fi
|
|
|
|
# Naive but effective: count organization list lines containing "org." OR common abbreviations.
|
|
# Adjust pattern if your doc renders differently.
|
|
COUNT="$(grep -Eo '(org\.[a-z0-9_]+)|\b(KM|KISC|LNB|LNA|NKMP|LNKC|NKC|VKKF|VDAA|VARAM|TA|TM|VVC|LVA|LUMII)\b' "$DOC_PATH" | wc -l | tr -d ' ')"
|
|
|
|
# Require at least 10 hits to ensure it isn't collapsed to just 3 orgs.
|
|
if [ "$COUNT" -lt 10 ]; then
|
|
echo "ERROR: stakeholder content appears too small (hits=$COUNT). Likely collapsed list."
|
|
exit 1
|
|
fi
|
|
|
|
echo "OK: stakeholder presence check passed (hits=$COUNT)"
|