diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-11-18 03:43:38 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-11-19 17:47:56 +0100 |
commit | 3fff9a74c739701723757a8ed72cfc7385e3440c (patch) | |
tree | 3b130e211a840eebfe8f17b2b5a79a7770c6ffe2 /gen_configkernel.sh | |
parent | gen_determineargs.sh: determine_real_args(): Initialize $KERNEL_OUTPUTDIR aft... (diff) | |
download | genkernel-3fff9a74c739701723757a8ed72cfc7385e3440c.tar.gz genkernel-3fff9a74c739701723757a8ed72cfc7385e3440c.tar.bz2 genkernel-3fff9a74c739701723757a8ed72cfc7385e3440c.zip |
gen_configkernel.sh: determine_kernel_config_file(): Don't check same config file multiple times
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_configkernel.sh')
-rwxr-xr-x | gen_configkernel.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh index cb31bf92..28382fe7 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -42,7 +42,13 @@ determine_kernel_config_file() { # This will allow user to copy previous kernel config file # which includes LOV by default to new version when doing # kernel upgrade since we add $ARCH to $LOV by default. - user_kconfig_candidates+=( "/etc/kernels/kernel-config-${VER}.${PAT}.${SUB}${EXV}${KERNEL_LOCALVERSION}" ) + local user_kconfig="/etc/kernels/kernel-config-${VER}.${PAT}.${SUB}${EXV}${KERNEL_LOCALVERSION}" + + # Don't check same file twice + if [[ "${user_kconfig_candidates[@]} " != *"${user_kconfig} "* ]] + then + user_kconfig_candidates+=( ${user_kconfig} ) + fi fi # Look for genkernel-3.x configs for backward compatibility, too |