tools: Make sethost.sh can be invoke from any directory

This commit is contained in:
Xiang Xiao 2020-03-19 10:41:36 +08:00 committed by Gregory Nutt
parent 73b655f3b2
commit 8a6d67d138
2 changed files with 4 additions and 3 deletions

View File

@ -282,6 +282,4 @@ fi
# The saved defconfig files are all in compressed format and must be
# reconstitued before they can be used.
cd ${TOPDIR} || { echo "Failed to cd to ${TOPDIR}"; exit 10; }
./tools/sethost.sh $debug $host
${TOPDIR}/tools/sethost.sh $debug $host

View File

@ -125,6 +125,9 @@ if [ ! -z "$1" ]; then
showusage
fi
WD=`test -d ${0%/*} && cd ${0%/*}; pwd`
cd $WD
if [ -x sethost.sh ]; then
nuttx=$PWD/..
else