diff options
author | xengineering <me@xengineering.eu> | 2023-03-10 20:15:05 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-03-11 19:10:17 +0100 |
commit | 52c82c11001604ddc6243e1455b5c576fca4bc3e (patch) | |
tree | 3d7d7150ac697ecf033f5ae31a538392a87a415a /cdda2flac.sh | |
parent | 617ed79590ea350301be4037eea4864857e907fe (diff) | |
download | scripts-52c82c11001604ddc6243e1455b5c576fca4bc3e.tar scripts-52c82c11001604ddc6243e1455b5c576fca4bc3e.tar.zst scripts-52c82c11001604ddc6243e1455b5c576fca4bc3e.zip |
Add cdda2flac.sh
Diffstat (limited to 'cdda2flac.sh')
-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}'." |