burn-dir
This is how to combine mkisofs and cdrecord. This should be a standard script on all systems, but it's not.
#!/bin/sh
## /usr/local/bin/burn-dir ##
# Burn-dir. Simple command to burn a
# directory onto a CD-R. Based off of
# mkisofs man page. Assumes that
# /etc/cdrecord.conf is correct.
if [ $# -eq 0 ] ; then
echo -e "Useage:"
echo -e " $0 directory \"Volume Name \""
exit 1
fi
CDROM=/dev/cdrom1
cdblocks=`mkisofs -print-size -quiet -V \
"$2" -r -J -f $1`
echo "mkisofs -quiet -V \"$2\" -r -J -f $1 | \
cdrecord -v -pad tsize=${cdblocks}s -"
mkisofs -quiet -V "$2" -r -J -f $1 | \
cdrecord -v -pad tsize=${cdblocks}s -
eject $CDROM