[PATCH RFC 3/8] aiaiai-sh-functions: remove [email] section from cfgfile

Keller, Jacob E jacob.e.keller at intel.com
Thu Mar 6 17:29:24 PST 2014


This patch is part of a series to improve user friendliness regarding
options for aiaiai-email-test-patchset, and improving use of the
configuration file. This patch removes the seperate [email] section, as
it really doesn't have any use. Just put these inside the global
section, since email and global really have no different meaning.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---
 doc/email/example-aiaiai.cfg    | 12 +++++-------
 email/aiaiai-email-sh-functions | 25 ++++++++++++-------------
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/doc/email/example-aiaiai.cfg b/doc/email/example-aiaiai.cfg
index 4636e28bb4bc..4a0b611ecb36 100644
--- a/doc/email/example-aiaiai.cfg
+++ b/doc/email/example-aiaiai.cfg
@@ -26,18 +26,16 @@
 	# patches or patch-sets can be validated at parallel.
 	jobs = 14
 
-# This section allows configuring contents of the replies which the Aiaiai
-# e-mail front-end will be sending to the patch submitter.
-# Do not put dots at the end of the sentences, the scripts will do it.
-[email]
 	# Every e-mail the front-end sends will start with the preamble
 	preamble = /home/aiaiai/work/aiaiai/preamble.txt
 
-	# .. and end with this signature.
+	# .. and end with this signature. Do not end with puncuation, as aiaiai
+	# will insert it for you.
 	signature = Regards, Aiaiai
 
-	# When the patch/patch-set passes the validation, this phrase
-	# is put after the preamble text.
+	# When the patch/patch-set passes the validation, this phrase is put
+	# after the preamble text. As above, do not end with punctuation, as
+	# aiaiai will insert it for you.
 	built_preamble = I have tested your changes
 
 # The e-mail front-end may operate on several project. Each project has its
diff --git a/email/aiaiai-email-sh-functions b/email/aiaiai-email-sh-functions
index 5e9449790323..f31581d98424 100644
--- a/email/aiaiai-email-sh-functions
+++ b/email/aiaiai-email-sh-functions
@@ -134,9 +134,9 @@ ini_config_get_or_die()
 	eval "$var=\"\$result\""
 }
 
-# Parse the "global" and "email" sections of the config file. The result is a
-# set of per-option variables and their values are exactly as in the
-# configuration file:
+# Parse the "global" section of the config file. The result is a set of
+# per-option variables and their values are exactly as in the configuration
+# file:
 #
 # cfg_ownname, cfg_ownmail, cfg_adminname, cfg_adminmail, cfg_workdir,
 # cfg_jobs, cfg_signature, cfg_built_preamble.
@@ -150,16 +150,15 @@ parse_config()
 {
 	local cfgfile="$1"
 
-	ini_config_get_or_die cfg_ownname   "$cfgfile" "global" "ownname"
-	ini_config_get_or_die cfg_ownmail   "$cfgfile" "global" "ownmail"
-	ini_config_get_or_die cfg_adminmail "$cfgfile" "global" "adminmail"
-	ini_config_get_or_die cfg_adminname "$cfgfile" "global" "adminname"
-	ini_config_get_or_die cfg_workdir   "$cfgfile" "global" "workdir"
-	ini_config_get_or_die cfg_jobs      "$cfgfile" "global" "jobs"
-
-	ini_config_get_or_die cfg_signature      "$cfgfile" "email" "signature"
-	ini_config_get_or_die cfg_preamble       "$cfgfile" "email" "preamble"
-	ini_config_get_or_die cfg_built_preamble "$cfgfile" "email" "built_preamble"
+	ini_config_get_or_die cfg_ownname        "$cfgfile" "global" "ownname"
+	ini_config_get_or_die cfg_ownmail        "$cfgfile" "global" "ownmail"
+	ini_config_get_or_die cfg_adminmail      "$cfgfile" "global" "adminmail"
+	ini_config_get_or_die cfg_adminname      "$cfgfile" "global" "adminname"
+	ini_config_get_or_die cfg_workdir        "$cfgfile" "global" "workdir"
+	ini_config_get_or_die cfg_jobs           "$cfgfile" "global" "jobs"
+	ini_config_get_or_die cfg_signature      "$cfgfile" "global" "signature"
+	ini_config_get_or_die cfg_preamble       "$cfgfile" "global" "preamble"
+	ini_config_get_or_die cfg_built_preamble "$cfgfile" "global" "built_preamble"
 
 	cfg_preamble="$(cat "$cfg_preamble")"
 
-- 
1.8.3.1




More information about the aiaiai mailing list