echo echo "********* AFConvert 0.1 *********" echo echo "Converts your APE files to FLAC" echo echo "Written by DJ Auto, based on autolame by Lawrence Shafer" echo # Usage Instructions. # 0 make sure you have mac and flac installed! # 1 Copy this file to /usr/bin/afconvert. # 2 cd to the directory where the wav's are that you want to convert. # 3 type afconvert # 4 they're done! # Go through the ape's for ape in *.ape do # Get original filename without .ape extension originName=$(echo "$ape"|awk '{sub(".ape", "");print $0}'); # Create the new filename newWav=$originName".wav" newFLAC=$originName".flac" echo "Decoding $ape to $newWav"; echo # Convert the ape to wav wavit=$(mac "$ape" "$newWav" "-d"); echo echo "Encoding $newWav to $newFLAC"; # Convert the wav to ape flacit=$(flac "$newWav" "$newFLAC"); echo # Remove temporary wavs echo "Removing temporary wave file:" "$newWav" rm "$newWav" echo done echo "Thanks for using AFConvert" echo echo "Please visit http://ringheimsauto.friwebteknologi.org for music, scripts & BS" echo