* Fix use of awk (sub instead of substr) when generating CRLF line endings.
authorSteve McIntyre <steve@einval.com>
Wed, 13 Jun 2012 00:16:06 +0000 (00:16 +0000)
committerSteve McIntyre <steve@einval.com>
Wed, 13 Jun 2012 00:16:06 +0000 (00:16 +0000)
    (Closes issue 59).

abcde
changelog

diff --git a/abcde b/abcde
index b4a9000..809040c 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -1555,7 +1555,7 @@ do_playlist ()
                ## this will convert the playlist to have CRLF line-endings, if specified
                ## (some hardware players insist on CRLF endings)
                if [ "$DOSPLAYLIST" = "y" ]; then
-                       awk '{substr("\r",""); printf "%s\r\n", $0}' "$OUTPUTDIR/$PLAYLISTFILE" > "$ABCDETEMPDIR/PLAYLISTFILE.tmp"
+                       awk '{sub("\r$",""); printf "%s\r\n", $0}' "$OUTPUTDIR/$PLAYLISTFILE" > "$ABCDETEMPDIR/PLAYLISTFILE.tmp"
 #                      mv -f "$ABCDETEMPDIR/PLAYLISTFILE.tmp" "$OUTPUTDIR/$PLAYLISTFILE"
                        cat "$ABCDETEMPDIR/PLAYLISTFILE.tmp" | sed 's/\//\\/' > "$OUTPUTDIR/$PLAYLISTFILE"
                fi
index ee2cd4d..5184af7 100644 (file)
--- a/changelog
+++ b/changelog
@@ -12,6 +12,8 @@ abcde 2.5.3 UNRELEASED
     users. LP: #535527
   * Remove documentation of the old "-R" option for recursive searching of
     local CDDB data, it's now enabled always. (Closes issue 57).
+  * Fix use of awk (sub instead of substr) when generating CRLF line endings.
+    (Closes issue 59).
 
  -- Steve McIntyre <93sam@debian.org>  Mon, 30 Apr 2012 16:59:14 +0100