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:
db8c591
)
mkuserimg.sh: set default size according to the $SRC_DIR size
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Thu, 30 May 2013 06:22:10 +0000
(14:22 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Thu, 30 May 2013 06:39:22 +0000
(14:39 +0800)
Calculate the default size by $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
c44129e
..
0435215
100755
(executable)
--- a/
ext4_utils/mkuserimg.sh
+++ b/
ext4_utils/mkuserimg.sh
@@
-47,6
+47,8
@@
fi
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
fi
if [ -n "$FC" ]; then