The script can be tested on an existing source.iso by invoking it with the --avoidsourcescript option, which will complete the installation using the launched script in the chroot instead of the the onboard version of livecd-iso-to-disk.
The script could also be copied to the /LiveOS/ directory in the device filesystem of an installed Live USB, and then called from the from the mount point for that device, such as, /run/media/liveuser/MyUSBname/LiveOS/livecd-iso-to-disk /dev/MyUSBnode /dev/target, where MyUSBname is the mount point directory name and MyUSBnode is the /dev filesystem node, such as, sdc1 or sdd1, etc.
--Fred