Corrected a missing if/fi
[clinton/abcde.git] / examples / abcded
1 #!/bin/sh
2 # The first version of this script used a very linux-dependent aproach.
3 # Modified to use cdparanoia and check for audio files on the CD
4
5 #NOTE! Change the CDROM variable to point to your device.
6 #CDROM=/proc/ide/hdh
7 DELAY=10
8 DO_RIP="/usr/bin/abcde -x -b -N"
9 CDPARANOIA="cdparanoia -Q 2>&1 | grep 'audio only'"
10
11 while true; do
12 # CAPACITY=`cat $CDROM/capacity`
13 # if [ $CAPACITY -gt 0 ]; then
14 # $RIP
15 # fi
16
17 sleep $DELAY
18 GO=$CDPARANOIA
19 RET=$?
20 if [ $RET = "0" ] ; then
21 DO_RIP
22 fi
23 done
24