From b802ae737e35445f2685a1e7c5f547dcd9a3f563 Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Sat, 16 Feb 2019 21:27:24 +0100 Subject: [PATCH] gapps: Fix small bugs and style inconsistencies in update-binary --- build/meta/com/google/android/update-binary | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/meta/com/google/android/update-binary b/build/meta/com/google/android/update-binary index 90b5972..528a347 100644 --- a/build/meta/com/google/android/update-binary +++ b/build/meta/com/google/android/update-binary @@ -97,9 +97,10 @@ if [ "$MEM" -lt "$LOWMEM" ] || [ "$STORAGE" -lt "$NEEDED_STORAGE" ]; then exec_util "rm -rf priv-app/SetupWizard" exec_util "rm -rf priv-app/Velvet" NEEDED_STORAGE=`expr $(exec_util "du -s ." | awk '{ print $1 }') + $STORAGE_BUFFER` - if [ "$STORAGE" -lt "$REALLY_LOW_STORAGE" ]; then + if [ "$STORAGE" -lt "$NEEDED_STORAGE" ]; then ui_print "Not enough space for GApps! Aborting" - cd .. && exec_utl "rm -rf system" + cd .. + exec_util "rm -rf system" exit 1 fi fi @@ -130,14 +131,15 @@ for dirs in $DIRS; do set_con system_file $f done done + ui_print "Copying files" exec_util "cp --preserve=a -r ./* /system/" if [ -e priv-app/SetupWizard ] ; then - exec_util "rm -rf /system/priv-app/Provision/" + exec_util "rm -rf /system/priv-app/Provision" fi ui_print "Cleaning up files" cd ../ -exec_util "rm -rf system/" +exec_util "rm -rf system" ui_print "Unmounting system partition" if umount -l /system; then