From 5cc042dc1aa04934d6024e2a2dae7071f415e651 Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Mon, 9 Nov 2020 22:30:09 +0800 Subject: [PATCH] build.sh: copy defconfig for custom board too N/A Signed-off-by: liuhaitao Change-Id: I0ba888d6ade32b02acb6e25bdd6f9ecf901dc66d --- tools/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/build.sh b/tools/build.sh index 29224e992dd..a4104da2c32 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -71,7 +71,11 @@ function build_board() echo "Error: ############# save ${1} fail ##############" exit 3 fi - cp ${NUTTXDIR}/defconfig ${ROOTDIR}/nuttx/boards/*/*/${1/[:|\/]//configs/} + if [ ! -d ${ROOTDIR}/nuttx/$1 ]; then + cp ${NUTTXDIR}/defconfig ${ROOTDIR}/nuttx/boards/*/*/${1/[:|\/]//configs/} + else + cp ${NUTTXDIR}/defconfig ${ROOTDIR}/nuttx/$1 + fi } function pack_sdk()