automating mass copies of CDs

I had a need to reproduce a stack of CDs for someone, and while it was easy enough to do, I found I was getting behind. I didn’t always know when a CD was done so I could replace the burned disk with blank media.

Making the image can be done with Disk Utility, dd, hdiutil, etc.

Now to make some copies. I figured out that if I sent a text message to my phone, I would be reminded to go flip the media.

while [ 1 != 0 ]
      # this is always true, so it will always run
   do time hdiutil burn ~/image.iso
      # man hdiutil for more details, if needed
   echo "toast is ready" | mail myphonenumber@vtext.com
      # I use Verizon: your carrier may do it differently.
done

It worked: I finished up the job today, getting as much done in one day as I did in the previous three.

If I knew how many I needed to make, other than “until the box is empty” I could have used while [ $i =< some number ] and added a counter ( $i++ ) to the loop.

Leave a Reply

Your email address will not be published. Required fields are marked *