Commits

Byron Clark committed dc5d377

Account for "new" format of toc.

Comments (0)

Files changed (1)

 CONTINUE=
 while [ "${CONTINUE}x" == "x" ]; do
     echo -n "Ripping disc ${DISC}..."
-    TRACKS=$(icedax dev=${DEVICE} -J -H -v toc -g 2>&1 | grep '^Tracks' | sed -e 's/^Tracks:\([[:digit:]]\+\) .*$/\1/')
+    TRACKS=$(icedax dev=${DEVICE} -J -H -v toc -g 2>&1 | grep '^T[[:digit:]]\+' | grep -v data | wc -l)
     icedax dev=${DEVICE} -H -t "1+${TRACKS}" -Owav audio &>/dev/null
     echo "done"
     echo -n "Encoding disc ${DISC}..."