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 <dengwenqi@xiaomi.com>
This commit is contained in:
Alan Carvalho de Assis 2023-05-09 15:27:48 -03:00 committed by Xiang Xiao
parent 00128ff2fe
commit b435005415
1 changed files with 13 additions and 1 deletions

View File

@ -18,6 +18,7 @@
#
WD=`test -d ${0%/*} && cd ${0%/*}; pwd`
CWD=`pwd`
USAGE="USAGE: $0 [options] <board>:<config>+"
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