3 # To call this script, make sure mksquashfs is somewhere in PATH
8 ${0##*/} SRC_DIR OUTPUT_FILE [-m MOUNT_POINT] [-c FILE_CONTEXTS] [-b BLOCK_SIZE] [-z COMPRESSOR] [-zo COMPRESSOR_OPT]
12 echo "in mksquashfsimage.sh PATH=$PATH"
20 if [ ! -d $SRC_DIR ]; then
21 echo "Can not find directory $SRC_DIR!"
28 if [[ "$1" == "-m" ]]; then
34 if [[ "$1" == "-c" ]]; then
40 if [[ "$1" == "-b" ]]; then
47 if [[ "$1" == "-z" ]]; then
53 if [[ "$1" == "-zo" ]]; then
59 if [ -n "$MOUNT_POINT" ]; then
60 OPT="$OPT -mount-point $MOUNT_POINT"
62 if [ -n "$FILE_CONTEXTS" ]; then
63 OPT="$OPT -context-file $FILE_CONTEXTS"
65 if [ -n "$BLOCK_SIZE" ]; then
66 OPT="$OPT -b $BLOCK_SIZE"
69 MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR $OUTPUT_FILE -no-progress -comp $COMPRESSOR $COMPRESSOR_OPT -no-exports -noappend -no-recovery -android-fs-config $OPT"
70 echo $MAKE_SQUASHFS_CMD