From b435005415a2354b0dd7e26f1a35caf0894ecdc5 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 9 May 2023 15:27:48 -0300 Subject: [PATCH] tools/refresh.sh: Add option to refresh custom board This patch modify the script to update only the boards configs of an specific chip or only the boards of an specific architecture. Examples: refresh.sh add custom board verify custom board: $ ./tools/refresh.sh --silent ../../xxx/configs/ap $ ./tools/refresh.sh --silent /yyy/xxx/configs/ap $ ./tools/refresh.sh --silent yyy/xxx/configs/ap Signed-off-by: dengwenqi --- tools/refresh.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/refresh.sh b/tools/refresh.sh index b13edbea17..786c1bcd1d 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -18,6 +18,7 @@ # WD=`test -d ${0%/*} && cd ${0%/*}; pwd` +CWD=`pwd` USAGE="USAGE: $0 [options] :+" ADVICE="Try '$0 --help' for more information" @@ -150,7 +151,18 @@ for CONFIG in ${CONFIGS}; do BOARDSUBDIR=`echo ${CONFIG} | cut -d':' -f1` fi - BOARDDIR=boards/*/*/$BOARDSUBDIR + BOARDDIR=${CONFIG} + if [ ! -d $BOARDDIR ]; then + BOARDDIR="${CWD}/${BOARDDIR}" + fi + + if [ -d $BOARDDIR ]; then + CONFIGSUBDIR=`basename ${CONFIG}` + BOARDDIR=$(dirname `dirname ${BOARDDIR}`) + else + BOARDDIR=boards/*/*/$BOARDSUBDIR + fi + SCRIPTSDIR=$BOARDDIR/scripts MAKEDEFS1=$SCRIPTSDIR/Make.defs