mirror of
https://github.com/apache/nuttx.git
synced 2025-12-07 01:44:23 +08:00
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:
committed by
Alan C. Assis
parent
f45216ecb3
commit
eea2975b36
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user