1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
$NetBSD: patch-ac,v 1.21 2005/10/04 20:58:43 sketch Exp $
--- abcde.orig 2005-10-04 21:39:38.000000000 +0100
+++ abcde 2005-10-04 21:44:53.000000000 +0100
@@ -1559,7 +1559,11 @@
do_cddbedit ()
{
if checkstatus cddb-edit >/dev/null; then
+ # Strip out ^M
CDDBDATA="$ABCDETEMPDIR/cddbread.$(checkstatus cddb-choice)"
+ CDDBDATATMP="$ABCDETEMPDIR/cddbread.tmp"
+ tr -d '\r' < $CDDBDATA > $CDDBDATATMP
+ mv $CDDBDATATMP $CDDBDATA
VARIOUSARTISTS="$(checkstatus variousartists)"
VARIOUSARTISTSTYLE="$(checkstatus variousartiststyle)"
return 0
@@ -1824,7 +1828,7 @@
echo "variousartiststyle=$VARIOUSARTISTSTYLE" >> "$ABCDETEMPDIR/status"
if [ "$EDITCDDB" = "y" ] && [ "$UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE" = "y" ]; then
- if [ $CDDBDATAMD5SUM != "" ] && [ $CDDBDATAMD5SUM != $($MD5SUM "$CDDBDATA" | cut -d " " -f 1) ]; then
+ if [ "$CDDBDATAMD5SUM" != "" ] && [ "$CDDBDATAMD5SUM" != "$($MD5SUM '$CDDBDATA' | cut -d' ' -f1)" ]; then
# This works but does not have the necessary error checking
# yet. If you are familiar with the CDDB spec
# (see http://www.freedb.org/src/latest/DBFORMAT)
@@ -2114,7 +2118,7 @@
DISTMP3=distmp3
VORBISCOMMENT=vorbiscomment
METAFLAC=metaflac
-NORMALIZE=normalize-audio
+NORMALIZE=normalize
CDSPEED=eject
VORBISGAIN=vorbisgain
MKCUE=mkcue
@@ -2169,6 +2173,7 @@
HTTPGET=fetch
NEEDCDROMID=y
OSFLAVOUR=FBSD
+ MD5SUM=md5
elif [ X$(uname) = "XDarwin" ] ; then
HTTPGET=curl
OSFLAVOUR=OSX
@@ -2178,6 +2183,9 @@
elif [ X$(uname) = "XOpenBSD" ] ; then
HTTPGET=wget
MD5SUM=md5
+elif [ X$(uname) = "XNetBSD" ] ; then
+ HTTPGET=wget
+ MD5SUM=md5
else
HTTPGET=wget
fi
@@ -2197,8 +2205,8 @@
fi
# Load system defaults
-if [ -r /etc/abcde.conf ]; then
- . /etc/abcde.conf
+if [ -r @PKG_SYSCONFDIR@/abcde.conf ]; then
+ . @PKG_SYSCONFDIR@/abcde.conf
fi
# Load user preference defaults
if [ -r $HOME/.abcde.conf ]; then
@@ -2231,6 +2239,9 @@
CDROM=/dev/acd0c
elif [ -e /dev/disk1 ]; then
CDROM=/dev/disk1
+ else
+ RAWPART=`sysctl -n kern.rawpartition | awk '{printf "%c",97+$0}'`
+ CDROM=/dev/rcd0$RAWPART
fi
fi
@@ -2427,7 +2438,7 @@
case "$CDROMREADERSYNTAX" in
cdparanoia|debug)
CDROMREADER="$CDPARANOIA"
- CDROMREADEROPTS="$CDPARANOIAOPTS"
+ CDROMREADEROPTS="$CDPARANOIAOPTS -g ${CDROM}"
;;
cdda2wav)
CDROMREADER="$CDDA2WAV"
@@ -2681,7 +2692,8 @@
do
# Cut off the command-line options we just added in
X=$(echo $X | cut -d' ' -f2)
- if [ "$(which $X)" = "" ]; then
+ Y="$(which $X | cut -d' ' -f1,2)"
+ if [ "$Y" = "" -o "$Y" = "no $X" ]; then
echo "abcde error: $X is not in your path." >&2
exit 1
elif [ ! -x $(which $X) ]; then
|