소스 검색

gapps: Fail if there's not enough space

Paul Keith 7 년 전
부모
커밋
0f6b456028
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      build/meta/com/google/android/update-binary

+ 6 - 0
build/meta/com/google/android/update-binary

@@ -81,8 +81,14 @@ fi
 LOWMEM=1572864
 MEM=`grep MemTotal /proc/meminfo | awk '{ print $2 }'`
 LOW_STORAGE=153600
+REALLY_LOW_STORAGE=92160
 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"
 cd /tmp
 unzip -o "$ZIP"