report script error correctly
authorGuillaume Castagnino <casta@xwing.info>
Tue, 2 Jun 2015 08:07:25 +0000 (10:07 +0200)
committerGuillaume Castagnino <casta@xwing.info>
Tue, 2 Jun 2015 08:07:25 +0000 (10:07 +0200)
META-INF/com/google/android/updater-script

index 6a70480f6741e53b9c701b29bf4ab86a5600f6b2..272ef584d7309829920c050b5defe554e2ecc20d 100644 (file)
@@ -8,7 +8,15 @@ set_metadata("/tmp/cm.sh", "uid", 0, "gid", 0, "mode", 0755);
 
 # mount system and run our script
 mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
-run_program("/tmp/cm.sh");
+ifelse(
+    run_program("/tmp/cm.sh") == 0,
+    (
+        ui_print("Patch success");
+    ),(
+        ui_print("=== PATCH FAILED! ===");
+        ui_print("See (adb) /tmp/recovery.log");
+    )
+);
 
 # finish
 unmount("/system");