[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[abcde] Bug#126327: abcde: bashism in /usr/bin/cddb-tool



Package: abcde
Version: 2.0.2-1
Severity: normal
Tags: patch

When generating a CDDB template, the output contains some extraneous `-e'
sequences if /bin/sh is a link to ash instead of bash.  For example:

   adric@glitch[~]$ cddb-tool template ac0df10d 13 150 19064 31654 \
   > 47671 62769 74520 95859 113138 138442 157840 184387 204938 \
   > 228183 3571 | head -10
   # xmcd CD database file
   #
   # Track frame offsets:
   -e #    150
   -e #    19064
   -e #    31654
   -e #    47671
   -e #    62769
   -e #    74520
   -e #    95859
 
The best fix (IMO, of course ;-) is to replace `echo -e' with `printf',
which is what the patch below does.  An alternate fix would be to
explicitly use /bin/bash for the interpreter.

----- <SNIP> -----
--- cddb-tool.orig	Sun Dec 23 18:35:52 2001
+++ cddb-tool	Sun Dec 23 18:37:08 2001
@@ -121,7 +121,7 @@
 	NUMTRACKS=$2
 	for x in $(seq 3 $(expr $NUMTRACKS + 2))
 	do
-		echo -e "#\t$(echo "$DISCID" | cut -f$x -d' ')"
+		printf "#\t$(echo "$DISCID" | cut -f$x -d' ')\n"
 	done
 	x=$(expr $x + 1)
 	LENGTH=$(echo "$DISCID" | cut -f$x -d' ')
----- <SNIP> -----


Cheers!

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux glitch 2.4.17 #1 Fri Dec 21 14:35:15 CST 2001 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages abcde depends on:
ii  cd-discid                     0.7-1      CDDB DiscID utility
ii  cdda2wav                      4:1.10-2   Creates WAV files from audio cd's
ii  cdparanoia                    3a9.8-4    An audio extraction tool for sampl
ii  vorbis-tools                  1.0rc2-1   Several Ogg Vorbis Tools
ii  wget                          1.7-3      utility to retrieve files from the


To unsubscribe: echo unsubscribe | mail abcde-request@whimsica.lly.org