blob: 524b910f5974e051b3ecf46f0e2bea3a5802408e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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}'."
|