annotate gettracks-lame.sh @ 4:3a7a8d8a070a

Added tag CDDB-STUFF_1_0 for changeset 74031379d3cb
author darius@midget.dons.net.au
date Tue, 23 Oct 2007 10:08:25 +0930
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 for t in $* ; do
5cead4da1db9 Initial import.
darius
parents:
diff changeset
9 num=`printf %02d $t`
5cead4da1db9 Initial import.
darius
parents:
diff changeset
10 name=`printf track_%s.mp3 $num`
5cead4da1db9 Initial import.
darius
parents:
diff changeset
11 echo Ripping $num to $name
5cead4da1db9 Initial import.
darius
parents:
diff changeset
12 (cdd -t $num - | sox -t cdr - -t wav - | lame -x -b 192 - $name) 2>> rip.log
5cead4da1db9 Initial import.
darius
parents:
diff changeset
13 if [ $? -ne 0 ]; then
5cead4da1db9 Initial import.
darius
parents:
diff changeset
14 echo "Failed!"
5cead4da1db9 Initial import.
darius
parents:
diff changeset
15 exit 1
5cead4da1db9 Initial import.
darius
parents:
diff changeset
16 fi
5cead4da1db9 Initial import.
darius
parents:
diff changeset
17 done
5cead4da1db9 Initial import.
darius
parents:
diff changeset
18