]>
diplodocus.org Git - flac-archive/blob - fa-rip
9 raw
=$
(sysctl
-n kern.rawpartition
> /dev
/null
| awk '{printf "%c",97+$0}')
11 if [[ -n ${ZSH_VERSION} ]]; then
15 for CDDEV
in /dev
/{cdroms
/cdrom
*,cdrom
*,rcd
*${raw},{a
,}cd*c
}; do
16 [[ -e ${CDDEV} ]] && return 0
23 while getopts 'd:t:' ch
; do
33 echo 'fa-rip [-t track-count]' >&2
38 shift $
((${OPTIND} - 1))
40 if [[ -z ${CDDEV} ]]; then
42 echo 'CDDEV environment variable not set, defaults did not work' >&2
48 dir
=$
(mktemp
-d flac-archive.XXXXXXXXXX
)
51 if [[ -z ${trackcount} ]]; then
53 trackcount
=$
(grep -c 'TRACK.*AUDIO' cue
)
55 mkcue
-t ${trackcount} ${CDDEV} > cue
60 exec cdparanoia
-d ${CDDEV} 1-${trackcount} wav