META-INF: update-binary: Make cleanup a function

This commit is contained in:
axxx007xxxz authored and osm0sis committed 2017-02-27 16:06:01 -04:00
1 parent bcf3dc5055
commit 7aebdb2efd
1 file changed
+2 -2
+2 -2
View File
@@ -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!";