#!/bin/bash -e ARGS="" for arg do case "${arg}" in -f|--follow-symlinks) ARGS=-f shift ;; *) break ;; esac done case $# in 1) ;; *) echo "usage: write_dvd [-f|--follow-symlinks] directory" exit 1 ;; esac sz=`genisoimage -print-size -iso-level 2 $ARGS -R $1` echo "genisoimage -iso-level 2 $ARGS -R $1 | wodim -v tsize=${sz}s fs=6m speed=1 dev=/dev/sr0 -" #genisoimage -iso-level 2 -R $1 | wodim -v tsize="${sz}s" fs=6m speed=1 dev=/dev/sr0 -