alpinelinux / alpine-make-vm-image

Make customized Alpine Linux disk image for virtual machines
MIT License
299 stars 101 forks source link

The getopt of alpine-make-vm-image does not handle -m #29

Closed liaoya closed 2 years ago

liaoya commented 2 years ago

Please refer to

sudo -E ./alpine-make-vm-image -f qcow2 -s 512M -m http://mirrors.ustc.edu.cn/alpine -k lts -p linux-firmware-none -- alpine.qcow2
alpine-make-vm-image: invalid option -- 'm'
Usage: alpine-make-vm-image [options] [--] <image> [<script> [<script-opts...>]]

This script creates a bootable Alpine Linux disk image for virtual machines.
If running on Alpine system (detected by file /etc/alpine-release), then it
also installs needed packages on the host system. On other systems you must
install them yourself: qemu-img, qemu-nbd, and mkfs utility for the chosen
ROOTFS. If $APK is not available on the host system, then static apk-tools
specified by $APK_TOOLS_URI is downloaded and used.

I check the code and find getopt -n $PROGNAME -o b:cCf:hi:k:p:r:s:tv. When I change it to getopt -n $PROGNAME -o b:cCf:hi:k:m:p:r:s:tv. It's OK.

I like this tool, it's simple and my packer script is powerful but it's complex!