OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69089eb
)
mkuserimg.sh: ensure the extra size is larger than 80MB
kitkat-x86
android-x86-4.4-r3
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Tue, 14 Apr 2015 16:43:32 +0000
(
00:43
+0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Tue, 14 Apr 2015 16:43:32 +0000
(
00:43
+0800)
ext4_utils/mkuserimg.sh
patch
|
blob
|
history
diff --git
a/ext4_utils/mkuserimg.sh
b/ext4_utils/mkuserimg.sh
index
0435215
..
2643e2b
100755
(executable)
--- a/
ext4_utils/mkuserimg.sh
+++ b/
ext4_utils/mkuserimg.sh
@@
-48,7
+48,10
@@
if [ -z $SIZE ]; then
echo "Need size of filesystem"
exit 2
elif [ 0 -eq 0$SIZE ]; then
- SIZE=$((`du -sm $SRC_DIR | cut -f1`*11/10))M
+ s=$(du -sm $SRC_DIR | cut -f1)
+ e=$(($s / 10))
+ [ $e -lt 80 ] && e=80
+ SIZE=$(($s + $e))M
fi
if [ -n "$FC" ]; then