X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=xfonts-traditional.git;a=blobdiff_plain;f=mkrules;h=a0d08def625542ade32a5ebeb08c816ef4522316;hp=b55b3976f65bf4b2ce88839c8edcda284cee920e;hb=2122f675a35e21edcdd7e27bfe3af01fa8835e9f;hpb=fe6a7d791ffe20cb0cf74a22e2c024dc6319574e diff --git a/mkrules b/mkrules index b55b397..a0d08de 100755 --- a/mkrules +++ b/mkrules @@ -25,6 +25,7 @@ chars () { } seenrules=/ +seenfoundries=/ while read keyword rest; do case "$keyword" in @@ -54,7 +55,19 @@ while read keyword rest; do print or die $!; exit; ' <$good` - printf "%s %s" "$oldfoundry" "$newfoundry" >>rules/foundries.new + case "$seenfoundries" in + */"$oldfoundry,$newfoundry"/*) + ;; + */"$oldfoundry,"*) + echo >&2 "inconsistent foundry mapping" + exit 1 + ;; + *) + seenfoundries=$seenfoundries$oldfoundry,$newfoundry/ + printf >>rules/foundries.new \ + "%s %s\n" "$oldfoundry" "$newfoundry" + ;; + esac case "$seenrules" in */"$newfoundry,$key"/*) exec 3>>rules/$newfoundry,$key.rules