Removing uneeded file.
[and.git] / PC^2 / pc2judge / samps / loopprint
blob2a286cae0d5bfb0149a007af1653d4aa5f9b84dc
1 #!/bin/sh
3 # CUSTOMIZE HERE
4 # this is the local print queue
5 # test with: lp -d thisvalue file_to_print
6 PRINTER=balloon
8 # use this value in the balloon "Print Device(Port)"
9 # may need to change this to a user writable directory
10 FIFO=/dev/balloonprinter
12 # the rest should not change
14 if [ -e $FIFO ]; then
15 if [ ! -p $FIFO ]; then
16 echo $FIFO is not a pipe, cannot continue
17 exit 2
19 else
20 # make the pipe
21 mkfifo $FIFO
22 # attempt to clean up after ourselves
23 trap 'rm -f $FIFO;exit 0' 0
26 while /bin/true
29 cat $FIFO | lp -d $PRINTER
31 done
33 # eof