1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/bin/sh
cd src;
# Tables with struct items
while read file table
do
: $file $table
< $file \
perl -e '$/= undef; while (<>) { print $1 if /(?<='$table'\[\])\s*=\s*{\n(([^}].*\n)+)/m }' \
| awk '/{ (US)?"/ {print $2}' \
| awk -F\" '{print $2}' \
| LC_ALL=C sort -c \
|| exit 1
done <<-END
readconf.c optionlist_config
globals.c optionlist_auths
globals.c debug_options
globals.c header_names
globals.c log_options
expand.c item_table
transport.c optionlist_transports
route.c optionlist_routers
transports/appendfile.c appendfile_transport_options
transports/autoreply.c autoreply_transport_options
transports/lmtp.c lmtp_transport_options
transports/pipe.c pipe_transport_options
transports/smtp.c smtp_transport_options
expand.c var_table
END
# Tables with just string items
while read file table
do
: $file $table
< $file \
perl -e '$/= undef; while (<>) { print $1 if /(?<='$table'\[\])\s*=\s*{\s?(([^}]*)+)}/m }' \
| awk -F\" '/"/ {print $2}' \
| LC_ALL=C sort -c \
|| exit 1
done <<-END
expand.c item_table
expand.c op_table_underscore
expand.c op_table_main
expand.c cond_table
acl.c verbs
acl.c conditions
END
|