build.sh: fix script exiting with code 0 on error

Change-Id: I54ca754b3b8e249c5a3702616ca3cc7fc7580c81
This commit is contained in:
Gokul GK 2022-12-27 10:09:48 +05:30 committed by Evan Anderson
parent 691c074b96
commit 49c4f331ff
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ CLR_BLD_CYA=$CLR_RST$CLR_BLD$(tput setaf 6) # cyan, bold
BUILD_TYPE="userdebug"
function checkExit () {
if [ $? -ne 0 ]; then
EXIT_CODE=$?
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo "${CLR_BLD_RED}Build failed!${CLR_RST}"
echo -e ""
exit $EXIT_CODE