annotate gettracks-xing.sh @ 3:74031379d3cb CDDB-STUFF_1_0

Initial revision
author darius
date Wed, 09 Aug 2000 02:18:47 +0000
parents 5cead4da1db9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
5cead4da1db9 Initial import.
darius
parents:
diff changeset
1 #!/bin/sh
5cead4da1db9 Initial import.
darius
parents:
diff changeset
2
5cead4da1db9 Initial import.
darius
parents:
diff changeset
3 if [ $# -lt 1 ]; then
5cead4da1db9 Initial import.
darius
parents:
diff changeset
4 echo Usage: $0 \<tracknum\> [ \<tracknum\> ... ]
5cead4da1db9 Initial import.
darius
parents:
diff changeset
5 exit 1
5cead4da1db9 Initial import.
darius
parents:
diff changeset
6 fi
5cead4da1db9 Initial import.
darius
parents:
diff changeset
7
5cead4da1db9 Initial import.
darius
parents:
diff changeset
8 rm -f /tmp/ripper.pipe
5cead4da1db9 Initial import.
darius
parents:
diff changeset
9 mkfifo /tmp/ripper.pipe
5cead4da1db9 Initial import.
darius
parents:
diff changeset
10
5cead4da1db9 Initial import.
darius
parents:
diff changeset
11 for t in $* ; do
5cead4da1db9 Initial import.
darius
parents:
diff changeset
12 num=`printf %02d $t`
5cead4da1db9 Initial import.
darius
parents:
diff changeset
13 name=`printf track_%s.mp3 $num`
5cead4da1db9 Initial import.
darius
parents:
diff changeset
14 echo Ripping $num to $name
5cead4da1db9 Initial import.
darius
parents:
diff changeset
15 xingmp3enc -S -B 192 /tmp/ripper.pipe $name &
5cead4da1db9 Initial import.
darius
parents:
diff changeset
16 cdd -t $num - 2>> rip.log | sox -t cdr - -t wav /tmp/ripper.pipe
5cead4da1db9 Initial import.
darius
parents:
diff changeset
17 if [ $? -ne 0 ]; then
5cead4da1db9 Initial import.
darius
parents:
diff changeset
18 echo "Failed!"
5cead4da1db9 Initial import.
darius
parents:
diff changeset
19 rm -f /tmp/ripper.pipe
5cead4da1db9 Initial import.
darius
parents:
diff changeset
20 exit 1
5cead4da1db9 Initial import.
darius
parents:
diff changeset
21 fi
5cead4da1db9 Initial import.
darius
parents:
diff changeset
22 done
5cead4da1db9 Initial import.
darius
parents:
diff changeset
23
5cead4da1db9 Initial import.
darius
parents:
diff changeset
24 rm -f /tmp/ripper.pipe
5cead4da1db9 Initial import.
darius
parents:
diff changeset
25