mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-19 18:49:40 +00:00
This problem has come up before, and it's time to add a check to catch this common error. * Makefile (AWK_SCRIPTS): Add checklinks.awk. (check, .PHONY): Add check_links. (check_links): New rule. * checklinks.awk: New file.
20 lines
265 B
Awk
20 lines
265 B
Awk
# Check links in tz tables.
|
|
|
|
# Contributed by Paul Eggert.
|
|
|
|
/^Link/ { used[$2] = 1 }
|
|
/^Zone/ { defined[$2] = 1 }
|
|
|
|
END {
|
|
status = 0
|
|
|
|
for (tz in used) {
|
|
if (!defined[tz]) {
|
|
printf "%s: Link to non-zone\n", tz
|
|
status = 1
|
|
}
|
|
}
|
|
|
|
exit status
|
|
}
|