commit 5f561ec1b1a2dbe6dde3584f410481cbc998f340 parent a8b078835dfc593ce3642f8a8b870fed04453643 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Sat, 29 Dec 2018 15:24:10 +0100 Simplify burn script Diffstat:
M | links/bin/burn-audio-cd.sh | | | 37 | +++++++++++-------------------------- |
1 file changed, 11 insertions(+), 26 deletions(-)
diff --git a/links/bin/burn-audio-cd.sh b/links/bin/burn-audio-cd.sh @@ -27,9 +27,9 @@ for f in "$@"; do outwav="$(basename "$f" "$extension").wav" if [ "$extension" = "mp3" ]; then - lame --decode "$f" "$outwav" || \ - mpg123 --rate 44100 --stereo --buffer 3072 --resync -w \ - "$outwav" "$f" + mpg123 --rate 44100 --stereo --buffer 3072 --resync -w \ + "$outwav" "$f" || \ + lame --decode "$f" "$outwav" elif [ "$extension" = "m4a" ]; then faad "$f" else @@ -38,26 +38,11 @@ for f in "$@"; do done # burn wav as audio cd (remove -dummy to really burn) -cdrecord -dummy -v -pad speed=1 dev="$drive" -dao -swab *.wav - -read -p "Really burn to $drive? [y/N] " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]]; then - #cdrecord -v -eject -pad speed=1 dev="$drive" -dao -swab *.wav - cdrecord -v -pad speed=1 dev="$drive" -dao -swab *.wav -else - exit 1 -fi - -# test cd -mpv cdda:// -read -p "Did this sound OK? [y/N] " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]]; then - rm *.wav - eject "$drive" - exit 0 -else - echo "Keeping wav files. Please try again." - exit 1 -fi +#cdrecord -dummy -v -pad speed=1 dev="$drive" -dao -swab *.wav +cdrecord -v -pad speed=1 dev="$drive" -dao -swab *.wav +#cdrecord -overburn -v -pad speed=1 dev="$drive" -dao -swab *.wav + +# clean up and eject +rm *.wav +eject "$drive" +exit 0