# Please configure the following bash script to reflect your
# local requirements.
#
# Inputs:
#   magic - sting returned by the file command
#   basename - name used to invoke filter (with dirctory name stripped)
#            if you are following my naming convension this will be
#            printer_name.filter_type
#   $0 $* - as supplied by lpd
#
# Outputs:
#   filter - filename of filter to use
#   nopipe - indicates that specified filter can't take piped input
#   prefilter - decompress shell command
#
# Set only one of filter and prefilter .
# 
# If a filter is installed as `if' then you can use [ "$1" = -c ] to test
# for the use of -l on lpr, you may wish to have lpr -l not test for
# compressed files.
#
# This file is ``sourced'' with stdout directed to the printer so if you
# want to print fancy banners in here you can. Remember that if you use
# a prefilter this file will be called a second time to identify the
# decompressed file so don't print banners if you're returning with
# prefilter set.

case $magic in
  block\ compressed\ data* | gzip\ compressed* ) prefilter="gzip -d" ;;
  * ) case $basename in
    # This is my example
    lp.df ) case $magic in
      DVI* ) filter=${0%/*}/sample-filters/dvi2epson; nopipe=1 ;;
      PostScript* ) filter=${0%/*}/sample-filters/ps2epson ;;
      "TeXinfo source" ) filter=${0%/*}/sample-filters/texi2epson ;;
    esac ;;
    # Please put the name of your old `if' here if you had one  
    lp.if ) filter=${0%/*}/text-filter ;;
  esac ;;
esac 




