4 echo "USAGE: `basename ${0}` [-h] <directory>"
6 echo " look for classes_def.xml under the specified directory"
7 echo " If no directory is specified, search this directory"
16 echo "ERROR: unrecognized option $1" >&2
23 if [ -z ${xml_directory} ];then
27 dict_files=`find ${xml_directory} -name classes_def.xml`
28 for xml_file in ${dict_files}
31 echo "check ${xml_file}"
32 sort -u ${xml_file} | \
33 grep -e 'Wrapper.*Assns' | \
34 perl -wane 'BEGIN { @h = (); }
35 m&.*Wrapper.*Assns\s*<(\S+?),\s*(\S+?)(?:,\s*(\S+?))?\s*>& and
36 push @h, [ ${1}, ${2}, ${3} || "void" ];
37 END { foreach my $f (@h) {
38 grep { $_->[0] eq $f->[1] and
39 $_->[1] eq $f->[0] and $_->[2] eq $f->[2]; } @h or
40 print "Missing selections for art::Assns<$f->[1], $f->[0], $f->[2]>\n";