diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-14 17:08:03 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-07-16 16:29:16 +0200 |
commit | b2cd6f1408b75dbef2bf24ffbff1e0f9376c94c3 (patch) | |
tree | 5e60e514508fb1c9a895304a5574c8c45c1f862d /gen_funcs.sh | |
parent | gen_funcs.sh: get_tc_vars(): Add READELF and OBJDUMP (diff) | |
download | genkernel-b2cd6f1408b75dbef2bf24ffbff1e0f9376c94c3.tar.gz genkernel-b2cd6f1408b75dbef2bf24ffbff1e0f9376c94c3.tar.bz2 genkernel-b2cd6f1408b75dbef2bf24ffbff1e0f9376c94c3.zip |
gen_funcs.sh: _tc-getPROG(): Fix overriding of default program
tc-getBUILD_PROG() could pass multiple variables so we need to check
all variables until we find our config variable containing user's value.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_funcs.sh')
-rwxr-xr-x | gen_funcs.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh index 507fadf..6917202 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -1167,8 +1167,16 @@ _tc-getPROG() { type=KERNEL fi - local prog_default_varname="DEFAULT_${type}_${var}" - local prog_override_varname="${type}_${var}" + local prog_default_varname= + local prog_override_varname= + for v in ${vars} ; do + prog_default_varname="DEFAULT_${type}_${v}" + if [[ -n "${!prog_default_varname}" ]] + then + prog_override_varname="${type}_${v}" + break + fi + done if [[ -n "${!prog_default_varname}" ]] \ && [[ "${!prog_override_varname}" != "${!prog_default_varname}" ]] |