提交 9875c42d 编写于 作者: J John Stultz 提交者: Michal Marek

merge_config.sh: Add option to display redundant configs

Provide a -r option to display when fragments contain redundant
options. This is really useful when breaking apart a config into
fragments, as well as cleaning up older fragments.
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
Acked-by: NDarren Hart <dvhart@linux.intel.com>
Acked-by: NBruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 55cae304
...@@ -31,10 +31,12 @@ usage() { ...@@ -31,10 +31,12 @@ usage() {
echo " -h display this help text" echo " -h display this help text"
echo " -m only merge the fragments, do not execute the make command" echo " -m only merge the fragments, do not execute the make command"
echo " -n use allnoconfig instead of alldefconfig" echo " -n use allnoconfig instead of alldefconfig"
echo " -r list redundant entries when merging fragments"
} }
MAKE=true MAKE=true
ALLTARGET=alldefconfig ALLTARGET=alldefconfig
WARNREDUN=false
while true; do while true; do
case $1 in case $1 in
...@@ -52,6 +54,11 @@ while true; do ...@@ -52,6 +54,11 @@ while true; do
usage usage
exit exit
;; ;;
"-r")
WARNREDUN=true
shift
continue
;;
*) *)
break break
;; ;;
...@@ -83,6 +90,8 @@ for MERGE_FILE in $MERGE_LIST ; do ...@@ -83,6 +90,8 @@ for MERGE_FILE in $MERGE_LIST ; do
echo Previous value: $PREV_VAL echo Previous value: $PREV_VAL
echo New value: $NEW_VAL echo New value: $NEW_VAL
echo echo
elif [ "$WARNREDUN" = "true" ]; then
echo Value of $CFG is redundant by fragment $MERGE_FILE:
fi fi
sed -i "/$CFG[ =]/d" $TMP_FILE sed -i "/$CFG[ =]/d" $TMP_FILE
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册