annotate gettracks-xing.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 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