diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-29 02:12:45 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-07-29 22:00:27 +0200 |
commit | c7200d139371d5c0cf8b60143a0abb60d8013c00 (patch) | |
tree | a5b91d53c47a3796279c1c5b060b8e54ca39503a | |
parent | Export $PATH to genkernel worker (diff) | |
download | genkernel-c7200d139371d5c0cf8b60143a0abb60d8013c00.tar.gz genkernel-c7200d139371d5c0cf8b60143a0abb60d8013c00.tar.bz2 genkernel-c7200d139371d5c0cf8b60143a0abb60d8013c00.zip |
gen_funcs.sh: gkbuild(): Export any set CCACHE_* and DISTCC_* variable
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-x | gen_funcs.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh index cb0763a..e700ae1 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -1233,6 +1233,19 @@ gkbuild() { "STRIP='$(tc-getSTRIP)'" ) + local envvar_prefix envvars_to_export envvar_to_export + for envvar_prefix in CCACHE_ DISTCC_ + do + envvars_to_export=$(compgen -A variable | grep "^${envvar_prefix}") + for envvar_to_export in ${envvars_to_export} + do + [ -z "${envvar_to_export}" ] && break + + envvars+=( "${envvar_to_export}='${!envvar_to_export}'" ) + done + done + unset envvar_prefix envvars_to_export envvar_to_export + if [ ${NICE} -ne 0 ] then NICEOPTS="nice -n${NICE} " |