debianmacno-cupsnodebathenaweb
Last change
on this file since 9f0c46e was
737d88b,
checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
|
Add the directory where the source is to the path for all scripts.
|
-
Property mode set to
100755
|
File size:
507 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | PATH="$(dirname $0):$PATH" |
---|
3 | |
---|
4 | CDDB= |
---|
5 | |
---|
6 | CACHE=$(cd-cddb-get) |
---|
7 | |
---|
8 | if [ "$?" = 0 ]; then |
---|
9 | CDDB=1 |
---|
10 | fi |
---|
11 | |
---|
12 | . "$CACHE" |
---|
13 | |
---|
14 | play_one () { |
---|
15 | T=$1 |
---|
16 | if [ -n "$CDDB" ]; then |
---|
17 | DESC=" - "$(eval 'echo $TRACK'$T) |
---|
18 | fi |
---|
19 | |
---|
20 | echo "cdda://$(($T - 1))" | mit-lpr -Psipbmp3@localhost -J "Track $T$DESC"; |
---|
21 | echo "Queued Track $T$DESC"; |
---|
22 | } |
---|
23 | |
---|
24 | TOPLAY="$2" |
---|
25 | |
---|
26 | if [ -z "$TOPLAY" -o "$TOPLAY" = "all" ]; then |
---|
27 | for i in $(seq 1 "$TRACKS"); do |
---|
28 | play_one $i |
---|
29 | done |
---|
30 | else |
---|
31 | shift; |
---|
32 | for i in "$@"; do |
---|
33 | play_one $i |
---|
34 | done |
---|
35 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.