#!/bin/sh # the the number of args > 0 and isn't then pass them to the command # else print the idiot message if [ $# -gt 0 ]; then dvdrecord -v driveropts=burnfree dev=/dev/dvd -dao -eject $@ else echo "" echo "Usage: writecd [options] track1...trackn" echo "Options:" echo "-dummy do everything with laser turned off" echo "-pad Pad data tracks with 15 zeroed sectors" echo " Pad audio tracks to a multiple of 2352 bytes" echo "-audio Subsequent tracks are CD-DA audio tracks" echo "-data Subsequent tracks are CD-ROM data mode 1 (default)" echo "" echo "Note: -dummy will do test writes for any of these" echo "" echo "To Create an all data CD from a raw data file" echo "writecd cdimage.raw" echo "" echo "To Write an all audio CD w/ properly sized files" echo "writecd -audio track*.cdda.wav" echo "" echo "Or the above can be a subdirectory containing those files" echo "For improperly sized files, use the -pad option" echo "" echo "To Create a mixed-mode CD (track 1 is data, the rest is audio)" echo "writecd cdimage.raw -audio track*.cdda.wav" echo "" fi