From f1947e30b9c2ced631e5dc8dfa69d39b09a6e37b Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 29 Nov 2013 18:49:19 +0200 Subject: [PATCH] email-lda: start parsing the configuration file This is a preparation for the further changes where we teach the email-lda script sending notifications when it rejects a patch. We'll need to know some basic information like own e-mail address, and this is stored in the config file. So parse it. Signed-off-by: Artem Bityutskiy --- email/aiaiai-email-lda | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/email/aiaiai-email-lda b/email/aiaiai-email-lda index dd789ab..472b0cb 100755 --- a/email/aiaiai-email-lda +++ b/email/aiaiai-email-lda @@ -30,7 +30,14 @@ yet complete patch series. Additionally, this program stores all the incoming mail in the "/mail" mail archive. +The "" file is the same file which "aiaiai-email-test-patchest" +uses. When this program receives an invalid e-mail (not a patch, invalid +subject, etc), it sends an e-mail notifications back. The "" file +is required for extracting basic information for sending the notifications (own +e-mail address, etc). + - the working directory. + - the configuration file. Options: --reap-archive=MIN remove all files created earlier than MIN @@ -296,9 +303,12 @@ while true; do shift done -[ "$#" -eq 1 ] || fatal "Insufficient or too many arguments" +[ "$#" -eq 2 ] || fatal "Insufficient or too many arguments" + +workdir=$(readlink -fv -- "$1"); shift +cfgfile=$(readlink -fv -- "$1"); shift -workdir=$(readlink -fv -- "$1"); +parse_config "$cfgfile" lda_tmp="$workdir/lda_tmp" mkdir -p $verbose -- "$lda_tmp" >&2 -- 2.50.1