All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
check_dictionaries.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 function usage() {
4  echo "USAGE: `basename ${0}` [-h] <directory>"
5  echo " -h (this help)"
6  echo " look for classes_def.xml under the specified directory"
7  echo " If no directory is specified, search this directory"
8 }
9 
10 case "$1" in
11  -h)
12  usage
13  exit 0
14  ;;
15  -*)
16  echo "ERROR: unrecognized option $1" >&2
17  usage
18  exit 1
19  ;;
20 esac
21 
23 if [ -z ${xml_directory} ];then
24  xml_directory="."
25 fi
26 
27 dict_files=`find ${xml_directory} -name classes_def.xml`
28 for xml_file in ${dict_files}
29 do
30  echo
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";
41  }; }'
42 done
43 
44 exit 0
process_name opflash particleana ie ie ie z
usage
Definition: doGit.sh:21
while getopts h
esac xml_directory
then shift fi
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
do i e
then echo fcl name