Thanks for the feeback!
trap bash builtin function executes the provided command when current process receives a signal, in that case
EXIT is a regular exit). A very useful pattern to run cleanup code.
Here are some snippets (from github repo):
Provide the ISO as first argument and you’ll be prompted to select from available USB drives amongst a list extracted from
lsblk. If there is only one USB device connected,
bootiso will automatically select it:
Or provide explicitly the USB device. Command fails and exit if the provided device is not USB, such as sata:
bootiso -d /dev/sde myfile.iso
Add a syslinux bootloader for non-hybrid ISOs:
bootiso -bd /dev/sde myfile.iso
dd instead of mount +
bootiso --dd -d /dev/sde myfile.iso
List available USB drives and exit: