Files
BetterDesk/scripts/check-wiki-staleness.sh
UNITRONIX 868aa5b22f docs: slim README, refresh wiki for 3.5.x, add Privacy
Replace the monolithic README with a short landing page, align wiki
with current 3.5.x product facts, add PRIVACY.md, Monitoring and
Unattended/WoL guides, and park historical audits under docs/archive.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-06 12:25:34 +02:00

28 lines
916 B
Bash

#!/usr/bin/env bash
# Fail if wiki source regains known stale / misleading phrases.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
WIKI="$ROOT/docs/wiki"
fail=0
# Patterns that should never appear as positive claims.
# Educational negations ("not mac_address", "no /api/login/2fa") are allowed.
while IFS= read -r line; do
file="${line%%:*}"
rest="${line#*:}"
num="${rest%%:*}"
text="${rest#*:}"
case "$text" in
*"not \`mac_address\`"*|*"not mac_address"*|*"no separate \`/api/login/2fa\`"*|*"no \`/api/login/2fa\`"*|*"There is **no** separate `/api/login/2fa`"*)
continue
;;
esac
echo "FAIL stale claim in $file:$num: $text"
fail=1
done < <(grep -RInE --include='*.md' '3\.3\.132|v2\.4\.0|mac_address|Node\.js Client API|/api/login/2fa|Node\.js 18\+|badge/Node\.js-18' "$WIKI" || true)
if [[ "$fail" -ne 0 ]]; then
exit 1
fi
echo "OK: wiki stale-claim checks passed"