view gettracks-xing.sh @ 7:ad83a38c3f5a

Don't open RW - not necessary.
author darius
date Thu, 18 Jul 2002 06:29:35 +0000
parents 5cead4da1db9
children
line wrap: on
line source

#!/bin/sh

if [ $# -lt 1 ]; then
  echo Usage: $0 \<tracknum\> [ \<tracknum\> ... ]
  exit 1
fi

rm -f /tmp/ripper.pipe
mkfifo /tmp/ripper.pipe

for t in $* ; do
  num=`printf %02d $t`
  name=`printf track_%s.mp3 $num`
  echo Ripping $num to $name
  xingmp3enc -S -B 192 /tmp/ripper.pipe $name &
  cdd -t $num - 2>> rip.log | sox -t cdr - -t wav /tmp/ripper.pipe
  if [ $? -ne 0 ]; then
    echo "Failed!"
    rm -f /tmp/ripper.pipe
    exit 1
  fi
done

rm -f /tmp/ripper.pipe