padding.diff 2.0 KB

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