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>
# 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