Scripts for ripping music CDs and doing metadata
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

48 lines
673 B

#!/bin/sh
umask 002
if [ "x$1" = "x" ]; then
echo "Usage: $0 name"
exit 1
fi
norip=false
device=/dev/cdrom
album=""
while [ "x$1" != "x" ]; do
if [ "x$1" = "x-norip" ]; then
norip=true
elif [ "x$1" = "x-d" ]; then
shift
device=$1
else
album=$1
fi
shift
done
if [ "x$album" = "x" ]; then
echo "Invalid album name"
exit 1
fi
mkdir -p $album
if [ "$norip" = "false" ]; then
cdown -r > $album/$album.toc -d $device
cdparanoia -B -d $device
rm -f *00.cdda.wav
fi
for f in *wav; do
g=`basename $f .cdda.wav | sed -e s/track//`
lame --vbr-new $f $album.$g.mp3
if [ -f $album.$g.mp3 ]; then
mv $album.$g.mp3 $album
rm -f $f
fi
done
chmod -R g+w $album