summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-11-29 18:49:19 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-11-29 18:49:19 +0200
commitf1947e30b9c2ced631e5dc8dfa69d39b09a6e37b (patch)
tree9c09c36c3a4107aa6dde5f294b5678e87013566d
parent01115712698bf127f9cfb9d86d19d1bb2ef2ae7b (diff)
downloadaiaiai-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-xemail/aiaiai-email-lda14
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