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>
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
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")"