#!/bin/bash
export PSXDIR=/home/tonton/psx
if [ $1 -z -o $2 -n ];
        then
        echo "\nERROR: Invalid usage.\n"
        echo "\n  Usage: psxrip [filename]\n"
        echo "\n  where filename is the desired name, minus extensions.\n"
fi
cd /usr/bin
./cdrdao read-cd --read-raw --datafile $PSXDIR/$1.bin --device /dev/sr0 --driver generic-mmc-raw $PSXDIR/$1.cue
