]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-test-patchset: parse general configuration settings earlier
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 10 Mar 2014 23:46:14 +0000 (16:46 -0700)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 11 Mar 2014 07:59:39 +0000 (09:59 +0200)
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@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-test-patchset

index d7400f6bd07536e4ee0967eddf9cb6df6eabad45..dd5dff47c85b6fdbfa67bffe32068c291fb0d749 100755 (executable)
@@ -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")"