Skip to content

Commit 33330bc

Browse files
roxellmasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 6fc9aac commit 33330bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/kconfig/merge_config.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
167167
sed -i "/$CFG[ =]/d" $MERGE_FILE
168168
fi
169169
done
170+
# In case the previous file lacks a new line at the end
171+
echo >> $TMP_FILE
170172
cat $MERGE_FILE >> $TMP_FILE
171173
done
172174

0 commit comments

Comments
 (0)