* Fix use of awk (sub instead of substr) when generating CRLF line endings.
authorEinvalSledge@gmail.com <EinvalSledge@gmail.com@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Wed, 13 Jun 2012 00:16:06 +0000 (00:16 +0000)
committerEinvalSledge@gmail.com <EinvalSledge@gmail.com@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Wed, 13 Jun 2012 00:16:06 +0000 (00:16 +0000)
    (Closes issue 59).

git-svn-id: http://abcde.googlecode.com/svn/trunk@342 a0fa61bc-5347-0410-a1a9-7f54aa4e1825

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