summaryrefslogtreecommitdiff
path: root/Master/xemtex/gslib/sysvlp.sh
blob: b93304ce48103b0baf736d558fc2cce7c89dbdd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# $Id: sysvlp.sh,v 1.1 2000/03/09 08:40:40 lpd Exp $

# System V 3.2 lp interface for parallel, postscript printer
# with ghostscript 2.5.n.
#
# Thanks to Arne Ludwig (arne@rrzbu.hanse.de) for this script.
#

DEVICE=lbp8
GSHOME=/local/gs/2.5b2
FONT=/local
LIBDIR=/usr/spool/lp/admins/lp/interfaces
#EHANDLER=$LIBDIR/ehandler.ps

GS_LIB=$GSHOME:$FONT/fonts:$FONT/fonts/lw:$FONT/fonts/gs
export GS_LIB

copies=$4
shift 5
files="$*"

# serial line settings
# stty 19200 ixon ixoff 0<&1
# stty 1200 tabs cread opost onlcr ixon ixany ff1 cr2 nl0 0<&1

# Brother HL-4: switch to HP laserjet II+ emulation
# echo "\033\015H\c"

i=1
while [ $i -le $copies ]
do
	for file in $files
	do
		$GSHOME/gs \
			-sOUTPUTFILE=/tmp/psp$$.%02d \
			-sDEVICE=$DEVICE \
			$EHANDLER $file \
			< /dev/null >> /usr/tmp/ps_log 2>&1

		cat /tmp/psp$$.* 2>> /usr/tmp/ps_log
		rm -f /tmp/psp$$.*
	done
	i=`expr $i + 1`
done
exit 0