Changeset View
Changeset View
Standalone View
Standalone View
Tools/scripts/MOVEDlint.awk
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | $3 !~ /^20[0-3][0-9]-[01][0-9]-[0-3][0-9]$/ { | ||||
lastdate = $3 | lastdate = $3 | ||||
if (system("test -f " portsdir "/" $1 "/Makefile")) | if (system("test -f " portsdir "/" $1 "/Makefile")) | ||||
delete missing[$1] | delete missing[$1] | ||||
else | else | ||||
resurrected[$1] = NR | resurrected[$1] = NR | ||||
if ($2) { | if ($2) { | ||||
flavor="" | |||||
if ($2 ~ "@") { | |||||
flavor=$2 | |||||
sub("@.*", "", $2) | |||||
sub(".*@", "", flavor) | |||||
} | |||||
if (system("test -f " portsdir "/" $2 "/Makefile")) | if (system("test -f " portsdir "/" $2 "/Makefile")) | ||||
missing[$2] = NR | missing[$2] = NR | ||||
# else | else | ||||
# delete resurrected[$2] | if (flavor != "") { | ||||
if (system("test \"" flavor "\" = \"`make -C " portsdir "/" $2 " -VFLAVORS:M" flavor "`\"")) | |||||
printf "%5d: %s does not have the %s flavor\n", NR, $2, flavor | sort | |||||
} | } | ||||
} | |||||
# Produces too many false positives | # Produces too many false positives | ||||
# if ($4 ~ /^[a-z].*/) | # if ($4 ~ /^[a-z].*/) | ||||
# printf "Initial value of 'reason' is lowercase: %5d (%s)\n", NR, $4 | # printf "Initial value of 'reason' is lowercase: %5d (%s)\n", NR, $4 | ||||
if ($4 ~ /\.$/) | if ($4 ~ /\.$/) | ||||
printf "%5d: Final character is a dot: (%s)\n", NR, $4 | printf "%5d: Final character is a dot: (%s)\n", NR, $4 | sort | ||||
} | } | ||||
END { | END { | ||||
for (port in resurrected) { | for (port in resurrected) { | ||||
printf "%5d: %s must be marked as resurrected\n", resurrected[port], port | sort | printf "%5d: %s must be marked as resurrected\n", resurrected[port], port | sort | ||||
error[resurrected[port]] = 1 | error[resurrected[port]] = 1 | ||||
} | } | ||||
for (port in missing) { | for (port in missing) { | ||||
printf "%5d: %s not found\n", missing[port], port | sort | printf "%5d: %s not found\n", missing[port], port | sort | ||||
error[missing[port]] = 1 | error[missing[port]] = 1 | ||||
} | } | ||||
close(sort) | close(sort) | ||||
} | } |