Tweak do_cdtext() so it works on OS X too. Closes issue 65.
authorEinvalSledge@gmail.com <EinvalSledge@gmail.com@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Wed, 13 Jun 2012 00:44:44 +0000 (00:44 +0000)
committerEinvalSledge@gmail.com <EinvalSledge@gmail.com@a0fa61bc-5347-0410-a1a9-7f54aa4e1825>
Wed, 13 Jun 2012 00:44:44 +0000 (00:44 +0000)
Thanks to richard.security.consultant for the patch.

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

abcde
changelog

diff --git a/abcde b/abcde
index 7a6caed..04c0294 100755 (executable)
--- a/abcde
+++ b/abcde
@@ -2241,10 +2241,19 @@ do_cdtext ()
                return 0
        fi
 
-       if [ "$CDROMID" = "" ]; then
-               CDDA2WAVCDROM="$CDROM"
-       else
+       if [ "$OSFLAVOUR" = "OSX" ] ; then
+               # Hei, we have to unmount the device before running anything like cdda2wav/icedax in OSX
+               diskutil unmount ${CDROM#/dev/}
+               # Also, in OSX the cdrom device for cdda2wav/icedax changes...
+               CDDA2WAVCDROM="IODVDServices"
+       elif [ "$OSFLAVOUR" = "FBSD" ] ; then
                CDDA2WAVCDROM="$CDROMID"
+       else
+               if [ "$CDROMID" = "" ]; then
+                       CDDA2WAVCDROM="$CDROM"
+               else
+                       CDDA2WAVCDROM="$CDROMID"
+               fi
        fi
 
        # Do we have CD-Text on the disc (and can the drive read it?)
@@ -2942,7 +2951,7 @@ do_cdread ()
                cdda2wav | icedax)
                        if [ "$OSFLAVOUR" = "OSX" ] ; then
                                # Hei, we have to unmount the device before running anything like cdda2wav/icedax in OSX
-                               diskutil unmount ${CDROM#/dev/} 0
+                               diskutil unmount ${CDROM#/dev/}
                                # Also, in OSX the cdrom device for cdda2wav/icedax changes...
                                CDDA2WAVCDROM="IODVDServices"
                        elif [ "$OSFLAVOUR" = "FBSD" ] ; then
index 8f9fdbd..7c4adfa 100644 (file)
--- a/changelog
+++ b/changelog
@@ -17,6 +17,8 @@ abcde 2.5.3 UNRELEASED
   * Make sure that ABCDETEMPDIR is quoted so we can deal with spaces in
     file and directory names. Closes issue 64. Thanks to
     richard.security.consultant for the patch, adapted slightly.
+  * Tweak do_cdtext() so it works on OS X too. Closes issue 65.
+    Thanks to richard.security.consultant for the patch.
 
  -- Steve McIntyre <93sam@debian.org>  Mon, 30 Apr 2012 16:59:14 +0100