diff options
-rwxr-xr-x | cdda2flac.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cdda2flac.sh b/cdda2flac.sh new file mode 100755 index 0000000..524b910 --- /dev/null +++ b/cdda2flac.sh @@ -0,0 +1,27 @@ +#!/bin/sh + + +# cdda2flac.sh TARGET_FOLDER +# +# Script to rip the inserted audio compact disc (CD) to a folder of +# FLAC-compressed music files with original quality. +# +# Provide the wanted target folder as command line argument. It will be created +# during execution. + + +folder="${1}" +folder="$(realpath "${folder}")" +echo "Saving to ${folder}" + +mkdir "${folder}" +return_path="$(pwd)" +cd "${folder}" + +cdparanoia -B + +find . -type f -iname '*.wav' -exec flac --delete-input-file {} \; + +cd "${return_path}" + +echo "\nDone! Files are saved to '${folder}'." |