From 52c82c11001604ddc6243e1455b5c576fca4bc3e Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 10 Mar 2023 20:15:05 +0100 Subject: Add cdda2flac.sh --- cdda2flac.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 cdda2flac.sh (limited to 'cdda2flac.sh') 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}'." -- cgit v1.2.3-70-g09d2