I have a nice Music Library of all my CDs encoded in the *.flac format.  I like it, so I don't want to get rid of it.

However, Mr. iPod doesn't like it - so I want to keep a mirror of my Music Library in the *.mp3 file format.

I'm not much cop at bash scripting.. but here's a shell of what I've got so far. (music-convertor.sh)

##Andy Loughran
##Mirror .flac library to mp3

for i in ~/Music/*/*.flac;
do lame -b 192 "$i";
mkdir ~/mp3Music/"$(pwd)"/;
mv *.mp3 ~/mp3Music/"$(pwd)";

It doesn't work yet - but that's my immediate comprehension of the sort of thing I'd like.

I would quite like it to rsync the library - so only encode the new files.. I guess this could be done by getting a list of all the files in each directory and just diffing the two to get the new files.. but there's bound to be a better way.

Therefore some questions -

Should I be using bash-scripting to do this.. is it an efficient use of resources, and if so can anyone provide me with a way that works..?

Is there a utility that already does this?