mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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:
+8
-3
@@ -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 $*
|
||||
|
||||
Reference in New Issue
Block a user