File: abcded

package info (click to toggle)
abcde 2.6-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 464 kB
  • ctags: 109
  • sloc: sh: 3,931; python: 210; perl: 136; makefile: 63
file content (24 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# The first version of this script used a very linux-dependent aproach.
# Modified to use cdparanoia and check for audio files on the CD

#NOTE! Change the CDROM variable to point to your device.
#CDROM=/proc/ide/hdh
DELAY=10
DO_RIP="/usr/bin/abcde -x -b -N"
CDPARANOIA="cdparanoia -Q 2>&1 | grep 'audio only'"

while true; do
#    CAPACITY=`cat $CDROM/capacity`
#     if [ $CAPACITY -gt 0 ]; then
#         $RIP
#     fi

	sleep $DELAY
	GO=$CDPARANOIA
	RET=$?
	if [ $RET = "0" ] ; then
		DO_RIP
	fi
done