diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2024-08-05 11:22:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-08 16:20:24 +0100 |
commit | af8151c833413aef2e6d1b8491b2bbcbd66e19f4 (patch) | |
tree | 6914bb7aeb42fc677c8200689e8b0b7bd63841ce /scripts | |
parent | bd21d96484911829a3927d0afe49142131e2c4ee (diff) | |
download | linux-stable-af8151c833413aef2e6d1b8491b2bbcbd66e19f4.tar.gz linux-stable-af8151c833413aef2e6d1b8491b2bbcbd66e19f4.tar.bz2 linux-stable-af8151c833413aef2e6d1b8491b2bbcbd66e19f4.zip |
scripts: kconfig: merge_config: config files: add a trailing newline
[ Upstream commit 33330bcf031818e60a816db0cfd3add9eecc3b28 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kconfig/merge_config.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index 63c8565206a4..d7d5c58b8b6a 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -150,6 +150,8 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do sed -i "/$CFG[ =]/d" $MERGE_FILE fi done + # In case the previous file lacks a new line at the end + echo >> $TMP_FILE cat $MERGE_FILE >> $TMP_FILE done |