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]
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
46 if [ -n "$MOUNT_POINT" ]; then
47 OPT="$OPT -mount-point $MOUNT_POINT"
49 if [ -n "$FILE_CONTEXTS" ]; then
50 OPT="$OPT -context-file $FILE_CONTEXTS"
52 if [ -n "$BLOCK_SIZE" ]; then
53 OPT="$OPT -b $BLOCK_SIZE"
56 MAKE_SQUASHFS_CMD="mksquashfs $SRC_DIR $OUTPUT_FILE -no-progress -comp lz4 -Xhc -no-exports -noappend -no-recovery -android-fs-config $OPT"
57 echo $MAKE_SQUASHFS_CMD