diff options
author | Simon Wilson <simonwilson@google.com> | 2015-06-24 16:22:44 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2015-06-24 16:22:44 -0700 |
commit | 12edfcadb72e6a3a8349e7404a14fd71dccff6c4 (patch) | |
tree | ca1fd3449c472c01c99048736cb98a74dda6b01c | |
parent | 241227995bb6102a0a216d9e1664a55e04d116f6 (diff) | |
parent | ee3d4d49ddcd8cd100c150091ffa85ae25e756fb (diff) | |
download | extras-12edfcadb72e6a3a8349e7404a14fd71dccff6c4.tar.gz |
resolved conflicts for merge of ee3d4d49 to mnc-dev
Change-Id: Ibfa043e2a7400e659f0355bcd139352b02a058e9
-rwxr-xr-x | squashfs_utils/mksquashfsimage.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/squashfs_utils/mksquashfsimage.sh b/squashfs_utils/mksquashfsimage.sh index dab80ba1..260a0fd9 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] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] +${0##*/} SRC_DIR OUTPUT_FILE [-s] [-m MOUNT_POINT] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT] EOT } @@ -48,6 +48,19 @@ if [[ "$1" == "-b" ]]; then shift; shift fi +COMPRESSOR="lz4" +COMPRESSOR_OPT="-Xhc" +if [[ "$1" == "-z" ]]; then + COMPRESSOR=$2 + COMPRESSOR_OPT= + shift; shift +fi + +if [[ "$1" == "-zo" ]]; then + COMPRESSOR_OPT=$2 + shift; shift +fi + OPT="" if [ -n "$MOUNT_POINT" ]; then OPT="$OPT -mount-point $MOUNT_POINT" @@ -59,7 +72,7 @@ if [ -n "$BLOCK_SIZE" ]; then OPT="$OPT -b $BLOCK_SIZE" fi -MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR/ $OUTPUT_FILE -no-progress -comp lz4 -Xhc -no-exports -noappend -no-recovery -android-fs-config $OPT" +MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR/ $OUTPUT_FILE -no-progress -comp $COMPRESSOR $COMPRESSOR_OPT -no-exports -noappend -no-recovery -android-fs-config $OPT" echo $MAKE_SQUASHFS_CMD $MAKE_SQUASHFS_CMD |