summaryrefslogtreecommitdiffstats
path: root/app-text/a2ps/files/a2ps-4.13c-psmandup.diff
blob: 67f2fab826b397667a651ee984de4b330842df73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- contrib/psmandup.in.orig	2004-12-20 00:16:07.000000000 +0100
+++ contrib/psmandup.in	2004-12-20 00:16:39.000000000 +0100
@@ -36,7 +36,7 @@
 message=
 psselect=${PSSELECT:-psselect}
 psset=${PSSET:-psset}
-tmpdir=/tmp/$program.$$
+tmpdir=`mktemp -d -t fixps.XXXXXX` || { echo "$program: Cannot create temporary dir!" >&2 ; exit 1; }
 
 # These two must be kept in synch.  They are opposed.
 verbose=echo
@@ -185,7 +185,6 @@
   trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
 fi
 
-mkdir $tmpdir
 
 # If printing from stdin, save into a tmp file
 if test $file = '-'; then