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:
5726a0d
)
mkuserimg.sh: set default size according to the $SRC_DIR size
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Tue, 8 Mar 2016 09:14:34 +0000
(17:14 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Thu, 4 May 2017 17:22:49 +0000
(
01:22
+0800)
Add extra size by the $SRC_DIR size plus 10%.
ext4_utils/mkuserimg.sh
patch
|
blob
|
history
diff --git
a/ext4_utils/mkuserimg.sh
b/ext4_utils/mkuserimg.sh
index
08c75be
..
e76aa0a
100755
(executable)
--- a/
ext4_utils/mkuserimg.sh
+++ b/
ext4_utils/mkuserimg.sh
@@
-107,6
+107,9
@@
fi
if [ -z $SIZE ]; then
echo "Need size of filesystem"
exit 2
+elif [ 0 -eq 0$SIZE ]; then
+ s=$(du -sm $SRC_DIR | cut -f1)
+ SIZE=$(($s / 10 + $s))M
fi
OPT=""