summaryrefslogtreecommitdiff
path: root/print/ghostscript-nox11/patches/patch-bc
blob: b1704066f4b75e5fe5b0fbbcc7b9b4977a71a1b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-bc,v 1.1 2005/11/27 17:08:31 adrianp Exp $

--- lib/pv.sh.orig	2000-03-09 08:40:40.000000000 +0000
+++ lib/pv.sh
@@ -29,9 +29,10 @@ TEMPDIR=.
 PAGE=$1
 shift
 FILE=$1
+TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1
 shift
-trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15
+trap "rm -rf $TEMPFILE" 0 1 2 15
 #dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
-dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
-gs $FILE.$$.pv
+dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE
+gs $TEMPFILE
 exit 0