Mercurial > ~darius > hgwebdir.cgi > cddb-stuff
annotate gettracks.sh @ 11:c122160e07da
Use Tcl 8.2
author | darius |
---|---|
date | Thu, 18 Jul 2002 06:38:42 +0000 |
parents | c9ade2a9c808 |
children |
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 | |
10 | 13 #ripper="cdd -t \$num - | sox -x -t wav - -t wav -" |
14 #ripper="cdda2wav -O wav -t \$num -D 0,6,0 -" | |
15 #comp="lame -V 1 -m j -b 160 - -" | |
3 | 16 #comp="gogo -silent -offset 0 -b 192 stdin" |
17 | |
18 for t in $tracks ; do | |
19 num=`printf %02d $t` | |
20 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
|
21 if [ -e ".${num}.done" ]; then |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
22 echo Skipping $num |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
23 continue |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
24 fi |
3 | 25 echo Ripping $num to $name |
10 | 26 # eval $ripper 2>> rip.log | $comp > $name |
27 dd if=/dev/acd0t$t bs=2352 | lame -r -x -V 1 -b 128 -h -m j -q1 - - >$name | |
3 | 28 if [ $? -ne 0 ]; then |
29 echo "Failed!" | |
30 exit 1 | |
31 fi | |
5
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
32 touch ".${num}.done" |
3 | 33 done |
34 | |
5
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
35 rm .*.done |
cf06ab549064
Write files to mark our progress and skip doing tracks if we have
darius
parents:
3
diff
changeset
|
36 |