From 83106b5710151ad174bba64022691f10f91a5d11 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Tue, 18 Jan 2011 17:55:00 +0800 Subject: [PATCH] mkuserimg.sh: set default size according to the $SRC_DIR size Calculate the default size by $SRC_DIR size plus 10%. Change-Id: I94a7f378b12ccdbd39367c81b1153b8654303a93 --- ext4_utils/mkuserimg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext4_utils/mkuserimg.sh b/ext4_utils/mkuserimg.sh index 3f2d2d44..4973e3d1 100755 --- a/ext4_utils/mkuserimg.sh +++ b/ext4_utils/mkuserimg.sh @@ -44,7 +44,7 @@ if [ -z $MOUNT_POINT ]; then fi if [ -z $SIZE ]; then - SIZE=128M + SIZE=$((`du -sm $SRC_DIR | cut -f1`*11/10))M fi MAKE_EXT4FS_CMD="make_ext4fs $ENABLE_SPARSE_IMAGE -l $SIZE -a $MOUNT_POINT $OUTPUT_FILE $SRC_DIR" -- 2.11.0