fixed bug in script where ability name can match cardname

master
melvin 2011-11-23 12:50:58 +08:00
parent 86438f6bbd
commit af8eda5afe
1 changed files with 8 additions and 9 deletions

View File

@ -7,22 +7,21 @@ BEGIN {
next
}
FILENAME ~ /mtg-data/ {
FILENAME ~ /mtg-data/ && $0 == "" {
getline
name = $1
if (name in impl) {
found[name] = 1
print name
while ($0 != "") {
getline
gsub(name,"@")
print $0
}
cnt++
print ""
}
}
name in found {
print
}
END {
print "found " cnt " card" > "/dev/stderr"
print "found " length(found) " cards" > "/dev/stderr"
for (i in impl) {
if (!(i in found)) {
print i " not found" > "/dev/stderr"