]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
email-sh-functions: add local variables to parse_prj_config
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 9 Jan 2014 23:28:10 +0000 (15:28 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 3 Feb 2014 10:36:26 +0000 (12:36 +0200)
Rather than assuming that the $cfgfile and $prj will be correctly defined, use
the passed parameters. Use local to create local variables to use, just like
in the regular config parsing.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
email/aiaiai-email-sh-functions

index 0fbeb94c9d7cac6acfa01bab831b43814a716520..a8156af9c011e25efede3c80333a4b39428a9bb8 100644 (file)
@@ -166,6 +166,9 @@ parse_config()
 # Usage: parse_prj_config <cfgfile> <prj>
 parse_prj_config()
 {
+       local cfgfile="$1"; shift
+       local prj="$1"; shift
+
        cfg_name="$(ini_config_get "$cfgfile" "prj_$prj" "name")"
        [ -n "$cfg_name" ] || return 0