#!/bin/sh

echo "`basename $0` (c) 2001 Paul T.Threshold"

if test "$1" = "" -o "$2" = "" ; then
	cat << EOF

usage:	`basename $0` datafile tocfile
	- datafile = image to be created
	- tocfile  = its toc file

EOF
	DATA="PTTDATA.bin";
	TOC="TOCFILE.toc";
else
	DATA=$1;
	TOC=$2;
fi

cat << EOF
I will read to '$DATA' datafile with '$TOC' as the tocfile...
Ctrl-C to abort.
Starting in 3 seconds...
EOF
sleep 1
echo "Starting in 2 seconds..."
sleep 1
echo -n "Starting in 1 second... "
sleep 1
echo Operation Starts.

sudo cdrdao read-cd --device 0,1,0 --driver generic-mmc --read-raw --datafile $DATA $TOC

