slackbuilds_ponce/audio/abcde/padding.diff
Andreas Voegele bae37de383 audio/abcde: Updated for version 2.9.1.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2018-05-26 06:59:23 +07:00

32 lines
2 KiB
Diff

Fix wrong track padding caused by trailing space. Reported under
https://abcde.einval.com/bugzilla/show_bug.cgi?id=82.
--- abcde-2.9.1.orig/abcde 2018-03-10 00:03:50.000000000 +0100
+++ abcde-2.9.1/abcde 2018-05-21 14:56:20.999531963 +0200
@@ -2103,7 +2103,7 @@
log warning "something went wrong while querying the CD... Maybe a DATA CD or the CD is not loaded?"
fi
- TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ')"
+ TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d '.\n')"
CDPARANOIAAUDIOTRACKS="$TRACKS"
LEADOUT="$(echo "$CDPARANOIAOUTPUT" | grep -Eo '^TOTAL[[:space:]]+([[:digit:]]+)' | get_last)"
@@ -2178,7 +2178,7 @@
if [ ! "$RET" = "0" ];then
log warning "something went wrong while querying the CD... Maybe a DATA CD?"
fi
- TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ')"
+ TRACKS="$(echo "$CDPARANOIAOUTPUT" | grep -E '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d '.\n')"
CDPARANOIAAUDIOTRACKS="$TRACKS"
else
# Previous versions of abcde would store the tracks on a file, instead of the status record.
@@ -5547,7 +5547,7 @@
fi
# Check if we have moved all the formats we had previously encoded, if we are not using the FORCE.
if [ "$DOCLEAN" = "y" ] && [ ! "$FORCE" = "y" ]; then
- ENCODED_FORMATS=$(grep -E "^encodetrack-(.{3,6})-(.{1,2})$" "${ABCDETEMPDIR}/status" | cut -d"-" -f2 | sort -u | tr '\n' '|')
+ ENCODED_FORMATS=$(grep -E "^encodetrack-(.{3,6})-(.{1,3})$" "${ABCDETEMPDIR}/status" | cut -d"-" -f2 | sort -u | tr '\n' '|')
MOVED_FORMATS=$(grep -E "^movetrack-output-(.{3,6})$" "${ABCDETEMPDIR}/status" | cut -d"-" -f3 | sort -u | tr '\n' '|')
if [ "$ENCODED_FORMATS" != "$MOVED_FORMATS" ]; then
log warning "The encoded formats does not match with the moved ones"