Mercurial > ~darius > hgwebdir.cgi > cddb-stuff
annotate gettracks.sh @ 5:cf06ab549064
Write files to mark our progress and skip doing tracks if we have
already done them.
author | darius |
---|---|
date | Sat, 12 Aug 2000 07:11:06 +0000 |
parents | 74031379d3cb |
children | c9ade2a9c808 |
rev | line source |
---|---|
3 | 1 #!/bin/sh |
2 | |
3 cddev=/dev/acd0c | |
4 root=`dirname $0` | |
5 if [ $# -eq 0 ]; then | |
6 tracks=`$root/cddb-id -f $cddev -n` | |
7 else | |
8 tracks=$* | |
9 fi | |
10 | |
11 echo Ripping tracks $tracks | |
12 | |
13 ripper="cdd -t \$num -" | |
14 comp="lame -x -b 192 - -" | |
15 #comp="gogo -silent -offset 0 -b 192 stdin" | |
16 | |
17 for t in $tracks ; do | |
18 num=`printf %02d $t` | |
19 name=`printf track_%s.mp3 $num` | |
5
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
20 if [ -e ".${num}.done" ]; then |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
21 echo Skipping $num |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
22 continue |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
23 fi |
3 | 24 echo Ripping $num to $name |
25 eval $ripper 2>> rip.log | sox -t cdr - -t wav - | $comp > $name | |
26 if [ $? -ne 0 ]; then | |
27 echo "Failed!" | |
28 exit 1 | |
29 fi | |
5
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
30 touch ".${num}.done" |
3 | 31 done |
32 | |
5
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
33 rm .*.done |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
34 |