mirror of
https://git.minetest.land/dn42/registry
synced 2025-10-09 08:53:40 +02:00

without depending on registry.dn42.us [dn42-schema.py]: implement _get_parent_inetnums for policy checks of new inetnums [dn42-schema.py] implement as-block check backend [dn42-schema.py] implement for route{,6} [dn42-schema.py] implement @family= without @netlevel [dn42-schema.py] move new to dn42_schema_local.py + restore dn42-schema.py [dn42-schema.py] add "check-pol2" using new dn42_schema_local.py
18 lines
460 B
Bash
Executable file
18 lines
460 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -o pipefail
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
echo "Usage: $0 COMMIT YOUR-MNT"
|
|
exit
|
|
fi
|
|
|
|
BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
|
|
BASE="$(dirname "$BASE")"
|
|
cd "$BASE" || exit 1
|
|
|
|
git diff --name-only $1 | while IFS='/' read -ra LINE; do
|
|
if [[ "${LINE[0]}" = "data" && -n "${LINE[2]}" ]]; then
|
|
utils/schema-check/dn42-schema.py -v policy ${LINE[1]} ${LINE[2]} $2
|
|
fi
|
|
done
|