diff --git a/install-e.sh b/install-e.sh index 7904d28c4829d01eb7e44d1cd7cfdc003bd8e354..9f0fe3d9f716765b65b2113ce43c287708b1bd50 100755 --- a/install-e.sh +++ b/install-e.sh @@ -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}