Commit da94c2e1 authored by topjohnwu's avatar topjohnwu

Update build.sh to detect failures

parent bcdd7451
...@@ -42,6 +42,12 @@ build_bin() { ...@@ -42,6 +42,12 @@ build_bin() {
echo "* Building binaries" echo "* Building binaries"
echo "************************" echo "************************"
ndk-build -j4 ndk-build -j4
if [ $? -ne 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Magisk binary tools build failed...."
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
echo "************************" echo "************************"
echo "* Copying binaries" echo "* Copying binaries"
echo "************************" echo "************************"
...@@ -57,8 +63,10 @@ build_bin() { ...@@ -57,8 +63,10 @@ build_bin() {
zip_package() { zip_package() {
if [ ! -f "zip_static/arm/bootimgtools" ]; then if [ ! -f "zip_static/arm/bootimgtools" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! Missing binaries!!" echo "! Missing binaries!!"
echo "! Please run \"$0 build\" before zipping" echo "! Please run \"$0 build\" before zipping"
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1 exit 1
fi fi
echo "************************" echo "************************"
...@@ -103,6 +111,12 @@ sign_zip() { ...@@ -103,6 +111,12 @@ sign_zip() {
echo "* Compiling ZipAdjust" echo "* Compiling ZipAdjust"
echo "************************" echo "************************"
gcc -o zipsigntools/zipadjust zipsigntools/src/*.c -lz gcc -o zipsigntools/zipadjust zipsigntools/src/*.c -lz
if [ $? -ne 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
echo "! ZipAdjust Build failed...."
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
exit 1
fi
chmod 755 zipsigntools/zipadjust chmod 755 zipsigntools/zipadjust
fi fi
echo "************************" echo "************************"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment