Voder-Vocoder

The Log of Hal Canary

Navigation: Home | THE LOG | Log Archives | Resume | Contact Info | Public Key | SSL | Math Applets | Site Map | RSS2 | Atom | Backend

« | »

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

Hal Canary | Computers & Code | 2004-02-22 10:52:55 UTC
Permanent Link Comments Off | No Comments

Comments are closed.
Email me your comments — h3 at halcanary dot org.

Copyright 1997-2012 by Hal Canary.
mailto: halcanary at gmail dot com
http://halcanary.org