2
|
1 #!/bin/sh
|
|
2
|
|
3 if [ $# -lt 1 ]; then
|
|
4 echo Usage: $0 \<tracknum\> [ \<tracknum\> ... ]
|
|
5 exit 1
|
|
6 fi
|
|
7
|
|
8 rm -f /tmp/ripper.pipe
|
|
9 mkfifo /tmp/ripper.pipe
|
|
10
|
|
11 for t in $* ; do
|
|
12 num=`printf %02d $t`
|
|
13 name=`printf track_%s.mp3 $num`
|
|
14 echo Ripping $num to $name
|
|
15 xingmp3enc -S -B 192 /tmp/ripper.pipe $name &
|
|
16 cdd -t $num - 2>> rip.log | sox -t cdr - -t wav /tmp/ripper.pipe
|
|
17 if [ $? -ne 0 ]; then
|
|
18 echo "Failed!"
|
|
19 rm -f /tmp/ripper.pipe
|
|
20 exit 1
|
|
21 fi
|
|
22 done
|
|
23
|
|
24 rm -f /tmp/ripper.pipe
|
|
25
|