OSDN Git Service
(root)
/
android-x86
/
system-extras.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mkuserimg.sh: set default size according to the $SRC_DIR size
[android-x86/system-extras.git]
/
ext4_utils
/
mkuserimg.sh
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=""