# Copyright (c) 1998-2001 Robert Woodcock <rcw@debian.org>
# Copyright (c) 2003-2006 Jesus Climent <jesus.climent@hispalinux.es>
# Copyright (c) 2009-2012 Colin Tuckley <colint@debian.org>
-# Copyright (c) 2012-2018 Steve McIntyre <93sam@@debian.org>
+# Copyright (c) 2012-2019 Steve McIntyre <93sam@@debian.org>
# Copyright (c) 2015-2017 Andrew Strong <andrew.david.strong@gmail.com>
# This code is hereby licensed for public consumption under either the
# GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice.
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-VERSION='2.9.2'
+VERSION='2.9.3-REV'
usage ()
{
CDPARANOIAAUDIOTRACKS="$TRACKS"
LEADOUT="$(echo "$CDPARANOIAOUTPUT" | grep -Eo '^TOTAL[[:space:]]+([[:digit:]]+)' | get_last)"
- OFFSETS="$(echo "$CDPARANOIAOUTPUT" | sed -n -e's/^ .* \([0-9]\+\) \[.*/\1/p')"
+ OFFSETS="$(echo "$CDPARANOIAOUTPUT" | awk '/^ +.*\[/ {print $4}')"
makeids
;;
*)
# Do we have CD-Text on the disc (and can the drive read it?)
(
cd "${SOURCE_WORKDIR}" && rm -f audio.* audio_*
- ${CDTEXT_READER} -J -v titles -D "${CDDA2WAVCDROM}" > "${SOURCE_WORKDIR}/cd-text" 2>&1
+ # Even redirect fd 0 to our output file. It seems cdda2wav
+ # writes to stdin too these days. Bizarre, buggy
+ # behaviour! Should be harmless for icedax.
+ ${CDTEXT_READER} -J -v titles -D "${CDDA2WAVCDROM}" > "${SOURCE_WORKDIR}/cd-text" 2>&1 0>&1
)
grep -a -q '^CD-Text: detected' "${SOURCE_WORKDIR}/cd-text"
ERRORCODE=$?