err 退出错误状态
This commit is contained in:
parent
5e811a21ef
commit
f4d82c183b
7
build.sh
7
build.sh
|
@ -8,6 +8,7 @@ script_dir=$(cd $(dirname $0);pwd)
|
||||||
cd $script_dir
|
cd $script_dir
|
||||||
echo $script_dir
|
echo $script_dir
|
||||||
pwd
|
pwd
|
||||||
|
err=0
|
||||||
mainverstr=$(cat ../sdk/include/huagao/brand.h |grep VERSION_MAIN)
|
mainverstr=$(cat ../sdk/include/huagao/brand.h |grep VERSION_MAIN)
|
||||||
mainverstr=${mainverstr: -3}
|
mainverstr=${mainverstr: -3}
|
||||||
mainverstr=$(echo $mainverstr)
|
mainverstr=$(echo $mainverstr)
|
||||||
|
@ -117,9 +118,12 @@ cmake ../code_device
|
||||||
make
|
make
|
||||||
|
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
|
|
||||||
|
err=1
|
||||||
echo "--------------------------------------make fail---------------------------------------"
|
echo "--------------------------------------make fail---------------------------------------"
|
||||||
#exit 1 # commented, we should restore the CMakeLists.txts...
|
# commented, we should restore the CMakeLists.txts...
|
||||||
else
|
else
|
||||||
|
err=0
|
||||||
echo "--------------------------------------make succeed------------------------------------"
|
echo "--------------------------------------make succeed------------------------------------"
|
||||||
fi
|
fi
|
||||||
#make
|
#make
|
||||||
|
@ -138,3 +142,4 @@ if [ -f ../code_device/hgdriver/wrapper/CMakeLists.txtbkp ]; then
|
||||||
pwd
|
pwd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
exit $err
|
Loading…
Reference in New Issue