mirror of
https://github.com/apache/nuttx.git
synced 2025-05-08 22:32:04 +08:00
Fixed empty line handling process_config.sh
This commit fixed empty line handling in the config file for being able to used KConfig-based defconfigs with the empty lines in them
This commit is contained in:
parent
2b513af2c3
commit
43b29a0547
@ -56,9 +56,15 @@ process_file() {
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
local key_config="$(echo "$line" | cut -d= -f1)="
|
||||
sed -i.backup "/$key_config/d" $output_file
|
||||
echo "$line" >> $output_file
|
||||
if [[ -n "$line" ]]; then
|
||||
local key_config="$(echo "$line" | cut -d= -f1)="
|
||||
sed -i.backup "/^$key_config/d" "$output_file"
|
||||
echo "$line" >> "$output_file"
|
||||
|
||||
echo "Appended $line to $output_file"
|
||||
else
|
||||
echo "The empty line from defconfig was skipped from adding to $output_file"
|
||||
fi
|
||||
fi
|
||||
done < "$input_file"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user