[PATCH 6/6] email-test-patchset: parse general configuration settings earlier

Jacob Keller jacob.e.keller at intel.com
Mon Mar 10 16:46:14 PDT 2014


This patch modifies the email patch testing program so that it parses
the general configuration settings as soon as it reads the configuration
file location. It also modifies the script so that it will use readlink
on the path instead of just blindly using the path. This is taken from
the LDA which does this as well.

Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
---
 email/aiaiai-email-test-patchset | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/email/aiaiai-email-test-patchset b/email/aiaiai-email-test-patchset
index d7400f6bd075..dd5dff47c85b 100755
--- a/email/aiaiai-email-test-patchset
+++ b/email/aiaiai-email-test-patchset
@@ -205,7 +205,8 @@ program_required "grep" ""
 program_required "sed" ""
 program_required "formail" ""
 
-cfgfile="$1"; shift
+cfgfile="$(readlink -fv -- "$1")"; shift
+parse_config "$cfgfile"
 
 # Save the mbox to a temporary file if it comes from stdin
 if [ -z "$mbox" ]; then
@@ -240,8 +241,6 @@ printf "\n"
 verbose "Testing mbox: \"$from: $subj (Message-Id: $id)\""
 verbose "parsing config file \"$cfgfile\""
 
-parse_config "$cfgfile"
-
 mkdir $verbose -p -- "$cfg_workdir" >&2
 
 tmpdir="$(mktemp --tmpdir="$cfg_workdir" -dt "$PROG.XXXX")"
-- 
1.8.3.1




More information about the aiaiai mailing list