6 if [ "$1" = "-v" ]; then
8 elif [ "$1" = "-q" ]; then
14 data_dir
="`dirname $0`/../data"
15 flags_dir
="$data_dir/flags"
16 flags_makefile
="$data_dir/flags/Makefile.am"
18 for nation
in `find $data_dir/nation -name '*.ruleset'`; do
19 $is_verbose && echo $nation
20 flag
=`grep -P "^flag\s*=\s*" "$nation" | sed -re 's/flag\s*=\s*\"(.*)\".*$/\1/'`
21 $is_verbose && echo "flag='$flag'"
22 for suf
in ".png" "-large.png" "-shield.png" "-shield-large.png" ".svg"; do
23 if [ -f "$flags_dir/$flag$suf" ]; then
24 grep -q "[[:space:]]$flag$suf" "$flags_makefile"
26 $non_quiet && echo "....$flag$suf is missing in $flags_makefile"
30 $non_quiet && echo "..$flag$suf is missing"
36 $non_quiet && echo "Total errors: $errors"
38 if [ $errors -gt 0 ]; then