From eea2975b36d286dc1b9a87457eee877645db8ea7 Mon Sep 17 00:00:00 2001 From: Antoine Juckler <6445757+ajuckler@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:12:15 +0900 Subject: [PATCH] tools/process_config.sh: Fix sed errors Ignore commented-out lines when deleting repeated defines in defconfig Signed-off-by: Antoine Juckler <6445757+ajuckler@users.noreply.github.com> --- tools/process_config.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/process_config.sh b/tools/process_config.sh index 5b67e1a95b4..746d15709f3 100755 --- a/tools/process_config.sh +++ b/tools/process_config.sh @@ -57,8 +57,10 @@ process_file() { fi else if [[ -n "$line" ]]; then - local key_config="$(echo "$line" | cut -d= -f1)=" - sed -i.backup "/^$key_config/d" "$output_file" + if [[ ! "$line" == \#* ]]; then + local key_config="$(echo "$line" | cut -d= -f1)=" + sed -i.backup "/^$key_config/d" "$output_file" + fi echo "$line" >> "$output_file" fi fi