From: Jacob Keller Date: Thu, 6 Mar 2014 22:08:48 +0000 (-0800) Subject: aiaiai-sh-functions: remove [email] section from cfgfile X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=248e155e9ff828c684752b6d9b6a22bd5b9d2f4b;p=users%2Fdedekind%2Faiaiai.git aiaiai-sh-functions: remove [email] section from cfgfile 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 --- diff --git a/doc/email/example-aiaiai.cfg b/doc/email/example-aiaiai.cfg index 4636e28..4a0b611 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 5e94497..f31581d 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")"