annotate gettracks-lame.sh @ 7:ad83a38c3f5a

Don't open RW - not necessary.
author darius
date Thu, 18 Jul 2002 06:29:35 +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 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