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>
This commit is contained in:
Antoine Juckler
2025-07-03 15:12:15 +09:00
committed by Alan C. Assis
parent f45216ecb3
commit eea2975b36

View File

@@ -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