diff options
author | axxx007xxxz <mattiabrsrn7@gmail.com> | 2017-02-17 22:17:27 +0100 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2017-02-27 16:06:01 -0400 |
commit | 7aebdb2efdedd14e06d6c877a611c1626d9a50bb (patch) | |
tree | 9ccf6f9430637f18a15f84b625871980c64b95d4 /META-INF/com | |
parent | bcf3dc505537743c20c41851e61ed4bb43330141 (diff) |
META-INF: update-binary: Make cleanup a function
Diffstat (limited to 'META-INF/com')
-rwxr-xr-x | META-INF/com/google/android/update-binary | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary index 9d08706..0daa345 100755 --- a/META-INF/com/google/android/update-binary +++ b/META-INF/com/google/android/update-binary @@ -23,6 +23,7 @@ set_perm_recursive() { } file_getprop() { grep "^$2" "$1" | cut -d= -f2; } getprop() { test -e /sbin/getprop && /sbin/getprop $1 || file_getprop /default.prop $1; } +cleanup() { rm -rf /tmp/anykernel; } abort() { ui_print "$*"; umount /system; umount /data; exit 1; } show_progress 1.34 4; @@ -91,11 +92,10 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.modules)" == 1 ]; then fi; if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.cleanup)" == 1 ]; then - rm -rf /tmp/anykernel; + cleanup; fi; umount /system; umount /data; ui_print " "; ui_print "Done!"; - |