Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09280615 authored by Josh Boyer's avatar Josh Boyer Committed by Michal Marek
Browse files

merge_config.sh: Use the first file as the initial config



Take the first config fragment and use it verbatim as the initial config
set.  This avoids running the verification loop for the first file, as
nothing has actually been merged at this point.  This significantly
increases performance for large config fragments.

Signed-off-by: default avatarJosh Boyer <jwboyer@redhat.com>
Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 5d09598d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,12 +58,16 @@ while true; do
	esac
done


INITFILE=$1
shift;

MERGE_LIST=$*
SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)

echo "Using $INITFILE as base"
cat $INITFILE > $TMP_FILE

# Merge files, printing warnings on overrided values
for MERGE_FILE in $MERGE_LIST ; do
	echo "Merging $MERGE_FILE"