#!/bin/bash

I1=I
I2=("Write Data CD On The Fly")

function write_data_cd_direct {

    unset EXT

    choose_wdir

    until [ "$YNRETVAL" != "0" ]; do

	eject_cdrw

	# exec_command doesn't understand the pipe.
	mkisofs -l \
		-r \
		-J \
		-T \
		-v \
		$WDIR | cdrecord -v \
			    	 speed=$SPEED \
				 dev=$GENERIC \
				 fs=${BUFFERS}m \
				 $OVERBURN \
				 $FORCE2 \
				 $DUMMY \
				 -

	yesnobox "Repeat this session ? (Take out the CD-R(W) disk)"

    done
}
