diff options
-rwxr-xr-x | squashfs_utils/mksquashfsimage.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/squashfs_utils/mksquashfsimage.sh b/squashfs_utils/mksquashfsimage.sh index 0079f6ef..9dae51b8 100755 --- a/squashfs_utils/mksquashfsimage.sh +++ b/squashfs_utils/mksquashfsimage.sh @@ -5,7 +5,7 @@ function usage() { cat<<EOT Usage: -${0##*/} SRC_DIR OUTPUT_FILE [-s] [-m MOUNT_POINT] [-d PRODUCT_OUT] [-C FS_CONFIG ] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] +${0##*/} SRC_DIR OUTPUT_FILE [-s] [-m MOUNT_POINT] [-d PRODUCT_OUT] [-C FS_CONFIG ] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] [-t COMPRESS_THRESHOLD] EOT } @@ -73,6 +73,13 @@ if [[ "$1" == "-zo" ]]; then shift; shift fi +COMPRESS_THRESHOLD=0 +if [[ "$1" == "-t" ]]; then + COMPRESS_THRESHOLD=$2 + shift; shift +fi + + OPT="" if [ -n "$MOUNT_POINT" ]; then OPT="$OPT -mount-point $MOUNT_POINT" @@ -89,6 +96,9 @@ fi if [ -n "$BLOCK_SIZE" ]; then OPT="$OPT -b $BLOCK_SIZE" fi +if [ -n "$COMPRESS_THRESHOLD" ]; then + OPT="$OPT -t $COMPRESS_THRESHOLD" +fi MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR/ $OUTPUT_FILE -no-progress -comp $COMPRESSOR $COMPRESSOR_OPT -no-exports -noappend -no-recovery -android-fs-config -no-fragments $OPT" echo $MAKE_SQUASHFS_CMD |