diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-11-29 18:49:19 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-11-29 18:49:19 +0200 |
commit | f1947e30b9c2ced631e5dc8dfa69d39b09a6e37b (patch) | |
tree | 9c09c36c3a4107aa6dde5f294b5678e87013566d | |
parent | 01115712698bf127f9cfb9d86d19d1bb2ef2ae7b (diff) | |
download | aiaiai-f1947e30b9c2ced631e5dc8dfa69d39b09a6e37b.tar.gz |
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 <artem.bityutskiy@linux.intel.com>
-rwxr-xr-x | email/aiaiai-email-lda | 14 |
1 files 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 "<workdir>/mail" mail archive. +The "<config.ini>" 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 "<config.ini>" file +is required for extracting basic information for sending the notifications (own +e-mail address, etc). + <workdir> - the working directory. +<cfgfile.ini> - 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 |