source: gutenbach-remctl/cd-play @ 5c45626

debianmacno-cupsweb
Last change on this file since 5c45626 was 5c45626, 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: 480 bytes
Line 
1#!/bin/sh
2
3CDDB=
4
5CACHE=$(cd-cddb-get)
6
7if [ "$?" = 0 ]; then
8    CDDB=1
9fi
10
11. "$CACHE"
12
13play_one () {
14    T=$1
15    if [ -n "$CDDB" ]; then
16        DESC=" - "$(eval 'echo $TRACK'$T)
17    fi
18
19    echo "cdda://$(($T - 1))" | mit-lpr -Psipbmp3@localhost -J "Track $T$DESC";
20    echo "Queued Track $T$DESC";
21}
22
23TOPLAY="$2"
24
25if [ -z "$TOPLAY" -o "$TOPLAY" = "all" ]; then
26    for i in $(seq 1 "$TRACKS"); do
27        play_one $i
28    done
29else
30    shift;
31    for i in "$@"; do
32        play_one $i
33    done
34fi
Note: See TracBrowser for help on using the repository browser.