Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scripts: kconfig: merge_config: config files: add a trailing newline

When merging files without trailing newlines at the end of the file, two
config fragments end up at the same row if file1.config doens't have a
trailing newline at the end of the file.

file1.config "CONFIG_1=y"
file2.config "CONFIG_2=y"
./scripts/kconfig/merge_config.sh -m .config file1.config file2.config

This will generate a .config looking like this.
cat .config
...
CONFIG_1=yCONFIG_2=y"

Making sure so we add a newline at the end of every config file that is
passed into the script.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Anders Roxell and committed by
Masahiro Yamada
33330bcf 6fc9aaca

+2
+2
scripts/kconfig/merge_config.sh
··· 167 167 sed -i "/$CFG[ =]/d" $MERGE_FILE 168 168 fi 169 169 done 170 + # In case the previous file lacks a new line at the end 171 + echo >> $TMP_FILE 170 172 cat $MERGE_FILE >> $TMP_FILE 171 173 done 172 174