Home | History | Annotate | Line # | Download | only in dist
checklinks.awk revision 1.1.1.1.2.2
      1  1.1.1.1.2.2  snj # Check links in tz tables.
      2  1.1.1.1.2.2  snj 
      3  1.1.1.1.2.2  snj # Contributed by Paul Eggert.
      4  1.1.1.1.2.2  snj 
      5  1.1.1.1.2.2  snj /^Link/ { used[$2] = 1 }
      6  1.1.1.1.2.2  snj /^Zone/ { defined[$2] = 1 }
      7  1.1.1.1.2.2  snj 
      8  1.1.1.1.2.2  snj END {
      9  1.1.1.1.2.2  snj     status = 0
     10  1.1.1.1.2.2  snj 
     11  1.1.1.1.2.2  snj     for (tz in used) {
     12  1.1.1.1.2.2  snj 	if (!defined[tz]) {
     13  1.1.1.1.2.2  snj 	    printf "%s: Link to non-zone\n", tz
     14  1.1.1.1.2.2  snj 	    status = 1
     15  1.1.1.1.2.2  snj 	}
     16  1.1.1.1.2.2  snj     }
     17  1.1.1.1.2.2  snj 
     18  1.1.1.1.2.2  snj     exit status
     19  1.1.1.1.2.2  snj }
     20