summaryrefslogtreecommitdiff
path: root/checklinks.awk
diff options
context:
space:
mode:
authorPhilip Paeps <philip@FreeBSD.org>2022-10-29 02:33:53 +0000
committerPhilip Paeps <philip@FreeBSD.org>2022-10-29 02:33:53 +0000
commit46649025f4057b32d59cc603cf32fc6bc51a2dba (patch)
treef493dea1da29efcdeaeffd223aaa572f140d1c44 /checklinks.awk
parentd479ab99455f971151b2e10d19198a726e3f6eec (diff)
Import tzdata 2022fvendor/tzdata/tzdata2022f
Diffstat (limited to 'checklinks.awk')
-rw-r--r--checklinks.awk24
1 files changed, 23 insertions, 1 deletions
diff --git a/checklinks.awk b/checklinks.awk
index f30901086536..82a5feab8399 100644
--- a/checklinks.awk
+++ b/checklinks.awk
@@ -32,6 +32,13 @@ BEGIN {
}
status = 1
}
+ if (backcheck && FILENAME != backcheck && $3 != "GMT") {
+ printf "%s: Link should be in '%s'\n", $3, backcheck
+ status = 1
+ }
+ if ($4 == "#=") {
+ shortcut[$5] = $3
+ }
used[$2] = 1
defined[$3] = $2
}
@@ -39,10 +46,25 @@ BEGIN {
END {
for (tz in used) {
if (defined[tz] != Zone) {
- printf "%s: Link to non-zone\n", tz
+ if (!defined[tz]) {
+ printf "%s: Link to nowhere\n", tz
+ status = 1
+ } else if (DATAFORM != "vanguard") {
+ printf "%s: Link to link\n", tz
status = 1
+ }
}
}
+ for (tz in shortcut) {
+ if (defined[shortcut[tz]] != defined[tz]) {
+ target = (!defined[tz] ? "absence" \
+ : defined[tz] == "\n" ? "zone" \
+ : defined[tz])
+ printf "%s: target %s disagrees with %s's target %s\n", \
+ tz, target, shortcut[tz], defined[shortcut[tz]]
+ status = 1
+ }
+ }
exit status
}