# added to todisc options list
"-burn" )
BURN=:
;;
"-device" )
shift
DEVICE="$1"
;;
function burn_dvd()
{
yecho
echo "Would you like to burn the DVD now ? Type 'yes' to continue: "
read input
echo
if [ ! -z "$input" -a "$input" = "yes" ]; then
echo "Proceeding to burn, continuing."
echo
if makedvd -burn -device "$DEVICE" "$OUT_DIR" > "$LOG_FILE" 2>&1; then
echo "Your DVD should be ready"
else
echo "There appears to have been a problem creating the DVD"
echo "Please see "$LOG_FILE" for details"
fi
fi
}
# at the end of the script
if $BURN; then
burn_dvd
fi