From: Josh Boyer Date: Wed, 1 Feb 2012 17:01:58 +0000 (-0500) Subject: merge_config.sh: Use the first file as the initial config X-Git-Tag: upstream/snapshot3+hdmi~7790^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09280615a0d924b3ab79acbff950f92c3420fd76;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Josh Boyer Acked-by: John Stultz Acked-by: Darren Hart Signed-off-by: Michal Marek --- diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index ceadf0e..23d738a 100644 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -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"