err 退出错误状态

This commit is contained in:
modehua 2023-01-14 11:53:42 +08:00
parent 5e811a21ef
commit f4d82c183b
1 changed files with 8 additions and 3 deletions

View File

@ -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,10 +118,13 @@ cmake ../code_device
make make
if [ $? -ne 0 ];then if [ $? -ne 0 ];then
echo "--------------------------------------make fail---------------------------------------"
#exit 1 # commented, we should restore the CMakeLists.txts... err=1
echo "--------------------------------------make fail---------------------------------------"
# commented, we should restore the CMakeLists.txts...
else else
echo "--------------------------------------make succeed------------------------------------" err=0
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