Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3831d045 authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Raise error when /e/ failed to be installed

parent e1dee99d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@
# Exit status
# - 0 : /e/ installed
# - 1 : Problems occurred (adb returns only 1 if an error occurs)
# - 2 : Problems occurred during file transfer
# - 3 : Problems occurred /e/ installation
# - 101 : DEVICE_ID missing
# - 102 : E_ARCHIVE_PATH missing

@@ -43,8 +45,13 @@ adb -s ${DEVICE_ID} shell twrp wipe system
adb -s ${DEVICE_ID} shell twrp wipe cache
adb -s ${DEVICE_ID} shell twrp wipe data
adb -s ${DEVICE_ID} push  ${E_ARCHIVE_PATH} /sdcard

if [ $? != 0 ] ; then exit 2 ; fi

adb -s ${DEVICE_ID} shell twrp install /sdcard/${E_IMAGE}

if [ $? != 0 ] ; then exit 3 ; fi

sleep 1

adb -s ${DEVICE_ID} shell rm /sdcard/${E_IMAGE}