debianmacno-cupsweb
Last change
on this file since 30beeab was
30beeab,
checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
|
Remove "gutenbach-" from directory names and rename "gutenbach" to "gutenbach-server"
|
-
Property mode set to
100755
|
File size:
697 bytes
|
Rev | Line | |
---|
[5c45626] | 1 | #!/bin/sh |
---|
[6bb3ffb] | 2 | PATH="$(dirname $0):$PATH" |
---|
[5c45626] | 3 | |
---|
| 4 | CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" |
---|
[53936a5] | 5 | MYUSER="gutenbach" |
---|
| 6 | MYHOST=`hostname`".mit.edu" |
---|
[5c45626] | 7 | |
---|
| 8 | DISCID=$(cd-discid /dev/cdrom 2>/dev/null) || exit 1 |
---|
| 9 | |
---|
| 10 | set -- $DISCID |
---|
| 11 | |
---|
| 12 | ID="$1" |
---|
| 13 | TRACKS="$2" |
---|
| 14 | |
---|
[53936a5] | 15 | mkdir -p /var/cache/gutenbach |
---|
[5c45626] | 16 | |
---|
[53936a5] | 17 | CACHEFILE="/var/cache/gutenbach/$ID" |
---|
[5c45626] | 18 | |
---|
| 19 | if [ ! -e "$CACHEFILE" ]; then |
---|
| 20 | |
---|
| 21 | CD=$(cddb-tool query "$CDDBURL" 3 "$MYUSER" "$MYHOST" $DISCID) \ |
---|
| 22 | || exit 2; |
---|
| 23 | |
---|
| 24 | file=$(tempfile) |
---|
| 25 | |
---|
| 26 | cddb-tool read "$CDDBURL" 3 "$MYUSER" "$MYHOST" \ |
---|
| 27 | $(echo "$CD" | head -1 | awk '{print $2 " " $3}') > "$file" \ |
---|
| 28 | || exit 3; |
---|
| 29 | |
---|
| 30 | echo "TRACKS=$TRACKS" > "$CACHEFILE" |
---|
| 31 | cddb-tool parse "$file" >> "$CACHEFILE" |
---|
| 32 | |
---|
| 33 | rm "$file" |
---|
| 34 | fi |
---|
| 35 | |
---|
| 36 | echo "$CACHEFILE" |
---|
| 37 | exit 0; |
---|
Note: See
TracBrowser
for help on using the repository browser.