From fbab262f2de33bf22d6b90d35528127692151ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 8 Feb 2021 14:40:43 +0100 Subject: [PATCH] kernel: Don't fail if "experimental" dir doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This directory has been automatically removed as there's no files inside it, as part of d3c98620591f902fec9cc2abbe6f03f93122052d Let's improve the logic in the scripts to avoid failing in case the "experimental" dir is not present. Fixes: #1328 Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/kernel/build-kernel.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/packaging/kernel/build-kernel.sh b/tools/packaging/kernel/build-kernel.sh index 2ad5f339a..aaa54af40 100755 --- a/tools/packaging/kernel/build-kernel.sh +++ b/tools/packaging/kernel/build-kernel.sh @@ -188,7 +188,12 @@ get_kernel_frag_path() { local arch_configs="$(ls ${arch_path}/*.conf)" # Exclude configs if they have !$arch tag in the header local common_configs="$(grep "\!${arch}" ${common_path}/*.conf -L)" - local experimental_configs="$(ls ${common_path}/experimental/*.conf)" + + local experimental_configs="" + local experimental_dir="${common_path}/experimental" + if [ -d "$experimental_dir" ]; then + experimental_configs=$(find "$experimental_dir" -name '*.conf') + fi # These are the strings that the kernel merge_config.sh script kicks out # when it reports an error or warning condition. We search for them in the