From 578d62b480039bb307a648d952f09de2567c55a2 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 20 Jun 2025 12:42:12 -0300 Subject: [PATCH] tools: Modify refresh.sh to support update all configs from a board This modification will simplify the case where the developer wants to update all board configs from a specific board. Signed-off-by: Alan C. Assis --- tools/refresh.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/refresh.sh b/tools/refresh.sh index 5db1ccd140..22499116aa 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -78,9 +78,11 @@ while [ ! -z "$1" ]; do echo " The architecture directory under nuttx/boards/" echo " " echo " The chip family directory under nuttx/boards//" - echo " Note1: all configuration is refreshed if : equals all." - echo " Note2: all configuration of arch XYZ is refreshed if \"arch:\" is passed" - echo " Note3: all configuration of chip XYZ is refreshed if \"chip:\" is passed" + echo " " + echo " Note1: all configurations are refreshed if : is replaced with \"all\" keyword" + echo " Note2: all configurations of arch XYZ are refreshed if \"arch:\" is passed" + echo " Note3: all configurations of chip XYZ are refreshed if \"chip:\" is passed" + echo " Note4: all configurations of board XYZ are refreshed if \"board:\" is passed" exit 0 ;; * ) @@ -129,6 +131,14 @@ else CHIP=$chipname echo "Normalizing all boards in chip: ${CHIP} !" CONFIGS=(`find boards/*/${CHIP} -name defconfig | cut -d'/' -f4,6`) + else + if [[ "X${CONFIGS}" == "Xboard:"* ]]; then + IFS=: read -r atype boardname <<< "${CONFIGS}" + BOARD=$boardname + echo "Normalizing all configs in board: ${BOARD} !" + # ATTENTION: It assumes we don't have a board with same name in other arch or chip + CONFIGS=(`find boards/*/*/${boardname} -name defconfig | cut -d'/' -f4,6`) + fi fi fi fi