Skip to content

Commit

Permalink
Remove completely unused (& dangerous) cleanup() function
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiKettunen committed Jan 12, 2020
1 parent ace56c0 commit b3514fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions boot-switcher/META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ ui_print() { [ -z "$1" ] && echo -e "ui_print \nui_print" > $OUTFD || echo -e "
# Log some text ($1) for script debugging
log() { echo "boot-switcher: $@"; }

# Remove package residue files from /tmp and unmount partitions
cleanup() { log "Cleaning up..."; rm -rf $FILES/; }

# Before quitting with an exit code ($1), show a message ($2)
abort() { ui_print "E$1: $2"; cleanup; exit $1; }
abort() { ui_print "E$1: $2"; exit $1; }

# <<< TWRP init <<<

Expand Down Expand Up @@ -202,5 +199,4 @@ dd if=$ROOT/boot/$TARGET-boot.img of=/dev/block/bootdevice/by-name/boot || abort
log "Boot target updated successfully."
ui_print " All done, enjoy your new OS!"
ui_print
cleanup
exit 0

0 comments on commit b3514fe

Please sign in to comment.