summaryrefslogtreecommitdiff
path: root/print/ghostscript/patches/patch-bd
blob: 18124fe2f155c506c25d80559ef6423ba72078dc (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
$NetBSD: patch-bd,v 1.1 2005/12/09 20:30:16 wiz Exp $

--- lib/sysvlp.sh.orig	2000-03-09 08:40:40.000000000 +0000
+++ lib/sysvlp.sh
@@ -27,20 +27,23 @@ files="$*"
 # Brother HL-4: switch to HP laserjet II+ emulation
 # echo "\033\015H\c"
 
+TEMPDIR=`mktemp -td sysvlp.XXXXXX` || exit 1
+
 i=1
 while [ $i -le $copies ]
 do
 	for file in $files
 	do
 		$GSHOME/gs \
-			-sOUTPUTFILE=/tmp/psp$$.%02d \
+			-sOUTPUTFILE=$TEMPDIR/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$$.*
+		cat $TEMPDIR/psp$$.* 2>> /usr/tmp/ps_log
+		rm -f $TEMPDIR/psp$$.*
 	done
 	i=`expr $i + 1`
 done
+rmdir $TEMPDIR
 exit 0