build.sh: make custom build path relative to top dir instead

N/A

Top dir is the parent directory of nuttx, if called build.sh from top
dir, we should also update the custom build path. And here convert to
absolute path.

Change-Id: Id6d2325b41ee792dbf9d4bb52654d6108c2bc67a
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao
2020-11-23 16:30:04 +08:00
parent c08ac2e35d
commit 78acbead3b
+8 -3
View File
@@ -71,10 +71,10 @@ function build_board()
echo "Error: ############# save ${1} fail ##############"
exit 3
fi
if [ ! -d ${ROOTDIR}/nuttx/$1 ]; then
if [ ! -d $1 ]; then
cp ${NUTTXDIR}/defconfig ${ROOTDIR}/nuttx/boards/*/*/${1/[:|\/]//configs/}
else
cp ${NUTTXDIR}/defconfig ${ROOTDIR}/nuttx/$1
cp ${NUTTXDIR}/defconfig $1
fi
}
@@ -171,5 +171,10 @@ fi
TOOLSDIR=${NUTTXDIR}/tools
build_board $*
if [ -d ${ROOTDIR}/${1} ]; then
build_board ${ROOTDIR}/${1} ${@:2}
else
build_board $*
fi
pack_sdk $*