]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-test-patchset: move project configuration parsing down a bit
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 4 Feb 2014 14:25:09 +0000 (16:25 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 4 Feb 2014 17:33:07 +0000 (19:33 +0200)
This patch is a little clean-up which makes the code a bit more consistent. It
makes sure we first check if the user specified the project, and only then try
to parse project configuration, not vice-versa.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-test-patchset

index b32ab161ebd31a76a80ec93eced62756c8d43393..694e0087fa90f17c65ea37c6d14f30fd4181db6f 100755 (executable)
@@ -198,9 +198,6 @@ prj="$(fetch_project_name "$to" "$cfg_ownmail")"
 
 verbose "Project \"$prj\""
 
-# Fetch project configuration
-parse_prj_config "$cfgfile" "$prj"
-
 # Reject the e-mail if the project has not been specified
 if [ -z "$prj" ]; then
        to=
@@ -217,6 +214,9 @@ EOF
        exit 0
 fi
 
+# Fetch project configuration
+parse_prj_config "$cfgfile" "$prj"
+
 # Check if we have this project in our config file
 if [ -z "$cfg_name" ]; then
        to=