Skip to content
Commit b37bcf2f authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by Anas Nashif
Browse files

scrips/merge_config.sh: fix corner case \n-less last line



When a configuration file fragment ends in a line that is not
terminated by a \n, it will mange the pasting of the following
fragment. For example, in file1.prj:

  CONFIG_SETTING_A=34
  CONFIG_SETTING_B=12

and file2.prj:

  CONFIG_SETTING_C=56

would become:

  CONFIG_SETTING_A=34
  CONFIG_SETTING_B=12CONFIG_SETTING_C=56

because there was no \n at the end of CONFIG_SETTING_B=12. This makes
the kconfig parser to reject CONFIG_SETTING_B and to loose
CONFIG_SETTING_C, which then has random consequences.

So, to avoid that problem, always add a newline after a config fragment.

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
parent b4fc0738
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment