mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Update build.sh to detect failures
This commit is contained in:
parent
bcdd74514f
commit
da94c2e1e5
14
build.sh
14
build.sh
@ -42,6 +42,12 @@ build_bin() {
|
||||
echo "* Building binaries"
|
||||
echo "************************"
|
||||
ndk-build -j4
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "! Magisk binary tools build failed...."
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
exit 1
|
||||
fi
|
||||
echo "************************"
|
||||
echo "* Copying binaries"
|
||||
echo "************************"
|
||||
@ -57,8 +63,10 @@ build_bin() {
|
||||
|
||||
zip_package() {
|
||||
if [ ! -f "zip_static/arm/bootimgtools" ]; then
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "! Missing binaries!!"
|
||||
echo "! Please run \"$0 build\" before zipping"
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
exit 1
|
||||
fi
|
||||
echo "************************"
|
||||
@ -103,6 +111,12 @@ sign_zip() {
|
||||
echo "* Compiling ZipAdjust"
|
||||
echo "************************"
|
||||
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
|
||||
fi
|
||||
echo "************************"
|
||||
|
Loading…
Reference in New Issue
Block a user