annotate gettracks.sh @ 4:3a7a8d8a070a

Added tag CDDB-STUFF_1_0 for changeset 74031379d3cb
author darius@midget.dons.net.au
date Tue, 23 Oct 2007 10:08:25 +0930
parents 74031379d3cb
children cf06ab549064
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
74031379d3cb Initial revision
darius
parents:
diff changeset
1 #!/bin/sh
74031379d3cb Initial revision
darius
parents:
diff changeset
2
74031379d3cb Initial revision
darius
parents:
diff changeset
3 cddev=/dev/acd0c
74031379d3cb Initial revision
darius
parents:
diff changeset
4 root=`dirname $0`
74031379d3cb Initial revision
darius
parents:
diff changeset
5 if [ $# -eq 0 ]; then
74031379d3cb Initial revision
darius
parents:
diff changeset
6 tracks=`$root/cddb-id -f $cddev -n`
74031379d3cb Initial revision
darius
parents:
diff changeset
7 else
74031379d3cb Initial revision
darius
parents:
diff changeset
8 tracks=$*
74031379d3cb Initial revision
darius
parents:
diff changeset
9 fi
74031379d3cb Initial revision
darius
parents:
diff changeset
10
74031379d3cb Initial revision
darius
parents:
diff changeset
11 echo Ripping tracks $tracks
74031379d3cb Initial revision
darius
parents:
diff changeset
12
74031379d3cb Initial revision
darius
parents:
diff changeset
13 ripper="cdd -t \$num -"
74031379d3cb Initial revision
darius
parents:
diff changeset
14 comp="lame -x -b 192 - -"
74031379d3cb Initial revision
darius
parents:
diff changeset
15 #comp="gogo -silent -offset 0 -b 192 stdin"
74031379d3cb Initial revision
darius
parents:
diff changeset
16
74031379d3cb Initial revision
darius
parents:
diff changeset
17 for t in $tracks ; do
74031379d3cb Initial revision
darius
parents:
diff changeset
18 num=`printf %02d $t`
74031379d3cb Initial revision
darius
parents:
diff changeset
19 name=`printf track_%s.mp3 $num`
74031379d3cb Initial revision
darius
parents:
diff changeset
20 echo Ripping $num to $name
74031379d3cb Initial revision
darius
parents:
diff changeset
21 eval $ripper 2>> rip.log | sox -t cdr - -t wav - | $comp > $name
74031379d3cb Initial revision
darius
parents:
diff changeset
22 if [ $? -ne 0 ]; then
74031379d3cb Initial revision
darius
parents:
diff changeset
23 echo "Failed!"
74031379d3cb Initial revision
darius
parents:
diff changeset
24 exit 1
74031379d3cb Initial revision
darius
parents:
diff changeset
25 fi
74031379d3cb Initial revision
darius
parents:
diff changeset
26 done
74031379d3cb Initial revision
darius
parents:
diff changeset
27