From 5d6d9eeb828d8d71454e1d571c2a196fe7038d6e Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 19 Mar 2020 13:43:30 +0800 Subject: [PATCH] tools/refresh.sh: Invoke make with V=1 if receiving -d option --- tools/refresh.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/tools/refresh.sh b/tools/refresh.sh index 37653163c1..14a9a6ee5d 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -38,6 +38,7 @@ USAGE="USAGE: $0 [options] :" ADVICE="Try '$0 --help' for more information" unset CONFIGS +debug=n defaults=n prompt=y nocopy=n @@ -45,6 +46,7 @@ nocopy=n while [ ! -z "$1" ]; do case $1 in --debug ) + debug=y set -x ;; --silent ) @@ -233,23 +235,36 @@ for CONFIG in ${CONFIGS}; do # Then run oldconfig or oldefconfig if [ "X${defaults}" == "Xy" ]; then - make olddefconfig + if [ "X${debug}" = "Xy" ]; then + make olddefconfig V=1 + else + make olddefconfig 1>/dev/null 2>&1 + fi else - make oldconfig + if [ "X${debug}" = "Xy" ]; then + make oldconfig V=1 + else + make oldconfig + fi fi fi # Run savedefconfig to create the new defconfig file - make savedefconfig - - # Show differences - - $CMPCONFIG $DEFCONFIG defconfig + if [ "X${debug}" = "Xy" ]; then + make savedefconfig V=1 + else + make savedefconfig 1>/dev/null 2>&1 + fi # Save the refreshed configuration if [ "X${prompt}" == "Xy" ]; then + + # Show differences + + $CMPCONFIG $DEFCONFIG defconfig + read -p "Save the new configuration (y/n)?" -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]