debianmacno-cupsnodebathenaweb
Last change
on this file since 83733c9 was
83733c9,
checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
|
Add all of the other stuff.o
Signed-off-by: root <root@…>
|
-
Property mode set to
100755
|
File size:
657 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" |
---|
4 | MYUSER="sipbmp3" |
---|
5 | MYHOST="zsr.mit.edu" |
---|
6 | |
---|
7 | DISCID=$(cd-discid /dev/cdrom 2>/dev/null) || exit 1 |
---|
8 | |
---|
9 | set -- $DISCID |
---|
10 | |
---|
11 | ID="$1" |
---|
12 | TRACKS="$2" |
---|
13 | |
---|
14 | mkdir -p /var/cache/sipbmp3 |
---|
15 | |
---|
16 | CACHEFILE="/var/cache/sipbmp3/$ID" |
---|
17 | |
---|
18 | if [ ! -e "$CACHEFILE" ]; then |
---|
19 | |
---|
20 | CD=$(cddb-tool query "$CDDBURL" 3 "$MYUSER" "$MYHOST" $DISCID) \ |
---|
21 | || exit 2; |
---|
22 | |
---|
23 | file=$(tempfile) |
---|
24 | |
---|
25 | cddb-tool read "$CDDBURL" 3 "$MYUSER" "$MYHOST" \ |
---|
26 | $(echo "$CD" | head -1 | awk '{print $2 " " $3}') > "$file" \ |
---|
27 | || exit 3; |
---|
28 | |
---|
29 | echo "TRACKS=$TRACKS" > "$CACHEFILE" |
---|
30 | cddb-tool parse "$file" >> "$CACHEFILE" |
---|
31 | |
---|
32 | rm "$file" |
---|
33 | fi |
---|
34 | |
---|
35 | echo "$CACHEFILE" |
---|
36 | exit 0; |
---|
Note: See
TracBrowser
for help on using the repository browser.