3 # To call this script, make sure make_ext4fs is somewhere in PATH
8 mkuserimg.sh [-s] SRC_DIR OUTPUT_FILE EXT_VARIANT MOUNT_POINT SIZE
12 echo "in mkuserimg.sh PATH=$PATH"
15 if [ "$1" = "-s" ]; then
16 ENABLE_SPARSE_IMAGE="-s"
20 if [ $# -ne 4 -a $# -ne 5 ]; then
26 if [ ! -d $SRC_DIR ]; then
27 echo "Can not find directory $SRC_DIR!"
38 *) echo "Only ext4 is supported!"; exit 3 ;;
41 if [ -z $MOUNT_POINT ]; then
42 echo "Mount point is required"
50 MAKE_EXT4FS_CMD="make_ext4fs $ENABLE_SPARSE_IMAGE -l $SIZE -a $MOUNT_POINT $OUTPUT_FILE $SRC_DIR"