Introduce cleanuponabort
This option allow to remove the working directory in case of abort; disabled by default.
This commit is contained in:
1 parent
2129ee98e2
commit
f7992be0a3
3 files changed
+9
-2
No files matched your search
@@ -24,7 +24,11 @@ set_perm_recursive() {
|
|||||||
file_getprop() { grep "^$2" "$1" | cut -d= -f2; }
|
file_getprop() { grep "^$2" "$1" | cut -d= -f2; }
|
||||||
getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; }
|
getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; }
|
||||||
cleanup() { rm -rf /tmp/anykernel; }
|
cleanup() { rm -rf /tmp/anykernel; }
|
||||||
abort() { ui_print "$*"; umount /system; umount /data; exit 1; }
|
if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.cleanuponabort)" == 1 ]; then
|
||||||
|
abort() { ui_print "$*"; cleanup; umount /system; umount /data; exit 1; }
|
||||||
|
else
|
||||||
|
abort() { ui_print "$*"; umount /system; umount /data; exit 1; }
|
||||||
|
fi;
|
||||||
|
|
||||||
show_progress 1.34 4;
|
show_progress 1.34 4;
|
||||||
ui_print " ";
|
ui_print " ";
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ do.devicecheck=1
|
|||||||
do.initd=1
|
do.initd=1
|
||||||
do.modules=1
|
do.modules=1
|
||||||
do.cleanup=1
|
do.cleanup=1
|
||||||
|
do.cleanuponabort=0
|
||||||
device.name1=maguro
|
device.name1=maguro
|
||||||
device.name2=toro
|
device.name2=toro
|
||||||
device.name3=toroplus
|
device.name3=toroplus
|
||||||
@@ -32,6 +33,8 @@ __do.modules=1__ will push the contents of the module directory to /system/lib/m
|
|||||||
|
|
||||||
__do.cleanup=0__ will keep the zip from removing it's working directory in /tmp/anykernel - this can be useful if trying to debug in adb shell whether the patches worked correctly.
|
__do.cleanup=0__ will keep the zip from removing it's working directory in /tmp/anykernel - this can be useful if trying to debug in adb shell whether the patches worked correctly.
|
||||||
|
|
||||||
|
__do.cleanuponabort=0__ will keep the zip from removing it's working directory in /tmp/anykernel in case of installation abort.
|
||||||
|
|
||||||
`is_slot_device=1` enables detection of the suffix for the active boot partition on slot-based devices and will add this to the end of the supplied `block=` path.
|
`is_slot_device=1` enables detection of the suffix for the active boot partition on slot-based devices and will add this to the end of the supplied `block=` path.
|
||||||
|
|
||||||
## // Command Methods ##
|
## // Command Methods ##
|
||||||
@@ -82,4 +85,3 @@ Not required, but any tweaks you can't hardcode into the source (best practice)
|
|||||||
|
|
||||||
|
|
||||||
Have fun!
|
Have fun!
|
||||||
|
|
||||||
@@ -8,6 +8,7 @@ do.devicecheck=1
|
|||||||
do.initd=1
|
do.initd=1
|
||||||
do.modules=0
|
do.modules=0
|
||||||
do.cleanup=1
|
do.cleanup=1
|
||||||
|
do.cleanuponabort=0
|
||||||
device.name1=maguro
|
device.name1=maguro
|
||||||
device.name2=toro
|
device.name2=toro
|
||||||
device.name3=toroplus
|
device.name3=toroplus
|
||||||
|
|||||||
Reference in new issue
Block a user