Evil POSIX CD burning sh script

orbea eca2a00461 doc: Document posh support. %!s(int64=6) %!d(string=hai) anos
INSTALL eca2a00461 doc: Document posh support. %!s(int64=4) %!d(string=hai) anos
LICENSE b123b6aa28 Update LICENSE. %!s(int64=5) %!d(string=hai) anos
README eca2a00461 doc: Document posh support. %!s(int64=4) %!d(string=hai) anos
burncd 947d67331f Revert "burncd: Exit with no music files earlier." %!s(int64=4) %!d(string=hai) anos
burncd.1 a47d6efeaf man: Set .Nm only once. %!s(int64=5) %!d(string=hai) anos
install.sh 56c1f51a1a burncd: Use stderr for errors and warnings only. %!s(int64=5) %!d(string=hai) anos

README

Burn audio files from the current directory to a blank CD.

burncd is a POSIX sh script known to work with the following shells:

ash
bash
dash
ksh
loksh
mksh
pdksh
posh (0.14.1 or newer)
yash
zsh

Additional dependencies:

cdrecord
coreutils (cp, df, ls, mkdir. mv, rm, tail, wc)
file

Optional dependencies:

flac : Used for flac support.
sox : Used for files that are not 16 bit, 44.1 kHz or stereo.

Usage:

burncd [OPTIONS]

-d, --debug, Debug output from external programs.
-e, --exclude, Exclude audio formats.
-f, --format, Choose the audio format.
-h, --help, Show this help message.
-n, --dry-run, Enable a test run without burning to a CD.
-o, --output, Path of the output directory.
-v, --verbose, Verbose logging.
-V. --version, Show the burncd version number.
-z, --device, Path of the CD drive.

Supported audio formats:

au, flac, wav

Environment variables:

CDRECORD : Path of the cdrecord binary.
FLAC : Path of the flac binary.
SOX : Path of the sox binary.

To use cdrecord as a normal user:

# chown root:somegroup "$(command -v cdrecord)"
# chmod 4710 "$(command -v cdrecord)"