#! /bin/sh

usage() {
    echo "USAGE:"
    echo "$0 <ISO> <IMG>"
    echo "     Creates the file <IMG> by copying the contents of the <ISO> file,"
    echo "     then creates two additional partitions (VFAT and EXT4), the latter"
    echo "     being enabled to contain persistence data. The size of the created"
    echo "     file is 14 GiB, which should fit on any '16 GB' memory stick."
}

if [ $# -lt 2 ]; then
    echo "Number of parameters = $#"
    usage
    exit 1
fi

ISO="$1"
IMG="$2"

python3 /usr/lib/python3/dist-packages/live_clone/makeLiveStick.py -f 1\
     -s "$ISO" -m "$IMG"

