gapps: Fail if there's not enough space

This commit is contained in:
Paul Keith
2018-08-07 14:27:25 -07:00
parent 25253abdb5
commit 0f6b456028

View File

@@ -81,8 +81,14 @@ fi
LOWMEM=1572864 LOWMEM=1572864
MEM=`grep MemTotal /proc/meminfo | awk '{ print $2 }'` MEM=`grep MemTotal /proc/meminfo | awk '{ print $2 }'`
LOW_STORAGE=153600 LOW_STORAGE=153600
REALLY_LOW_STORAGE=92160
STORAGE=`exec_util "df /system" | grep -v Filesystem | awk '{ print $4 }'` STORAGE=`exec_util "df /system" | grep -v Filesystem | awk '{ print $4 }'`
if [ "$STORAGE" -lt "$REALLY_LOW_STORAGE" ]; then
ui_print "Not enough space for GApps! Aborting"
exit 1
fi
ui_print "Extracting files" ui_print "Extracting files"
cd /tmp cd /tmp
unzip -o "$ZIP" unzip -o "$ZIP"