#!/bin/sh

#################################################
## print v0.0                                  ##
## print text files in emulated duplex using   ##
## enscript and dplx/duplex                    ##
##                                             ##
## Calling sequence:                           ##
##  print [<print-file>]                       ##
##                                             ##
## Copyright (c) 23 Jun 2003 Joseph J. Pollock ##
##   JPmicrosystems - josephj at main.nc.us    ##
##                                             ##
## This program is free software; you can      ##
## redistribute it and/or modify it under the  ##
## terms of the GNU General Public License as  ##
## published by the Free Software Foundation;  ##
## either version 2 of the License, or         ##
## (at your option) any later version.         ##
##                                             ##
## This program is distributed in the hope     ##
## that it will be useful, but WITHOUT ANY     ##
## WARRANTY; without even the implied warranty ##
## of MERCHANTABILITY or FITNESS FOR A         ##
## PARTICULAR PURPOSE. See the GNU General     ##
## Public License for more details.            ##
##                                             ##
## You should have received a copy of the      ##
## GNU General Public License along with this  ##
## program; if not, write to                   ##
##    the Free Software Foundation, Inc.       ##
##    59 Temple Place - Suite 330              ##
##    Boston, MA  02111-1307, USA              ##
## See: http://www.gnu.org/copyleft/gpl.html   ##
#################################################

if [ $# -eq 1 ]    # If there is an input file parameter, print it
then
  enscript -Z --silent --word-wrap --margins=50:50:: --header='$n | Page $% of $= | Modified $D $T' -fTimes-Roman14 -FTimes-Roman18 $*
else               # else assume input is stdin
  enscript -Z --silent --word-wrap --margins=50:50:: --header='|| Page $% of $=' -fTimes-Roman14 -FTimes-Roman18
fi
