summaryrefslogtreecommitdiffstats
path: root/scripts/source_checks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:16:13 +0000
commite90fcc54809db2591dc083f43ef54c6ec8c60847 (patch)
treef20bc206c3c2d5d59d37c46c5cf5d53a20642556 /scripts/source_checks
parentInitial commit. (diff)
downloadexim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.tar.xz
exim4-e90fcc54809db2591dc083f43ef54c6ec8c60847.zip
Adding upstream version 4.96.upstream/4.96upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/source_checks')
-rw-r--r--scripts/source_checks52
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/source_checks b/scripts/source_checks
new file mode 100644
index 0000000..918a6f8
--- /dev/null
+++ b/scripts/source_checks
@@ -0,0 +1,52 @@
+#!/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
+ std-crypto.c dh_constants
+ 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
+ acl.c conditions
+ acl.c controls_list
+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
+END
+