be8f42
--- a2ps-4.13/contrib/psmandup.in.tmpdir	1999-10-24 14:06:42.000000000 +0100
be8f42
+++ a2ps-4.13/contrib/psmandup.in	2006-08-08 14:52:22.000000000 +0100
d84993
@@ -36,7 +36,7 @@
d84993
 message=
d84993
 psselect=${PSSELECT:-psselect}
d84993
 psset=${PSSET:-psset}
d84993
-tmpdir=/tmp/$program.$$
d84993
+tmpdir=$(mktemp -d /tmp/$program.XXXXXX)
d84993
 
d84993
 # These two must be kept in synch.  They are opposed.
d84993
 verbose=echo
be8f42
--- a2ps-4.13/contrib/fixps.in.tmpdir	2000-02-21 08:16:15.000000000 +0000
be8f42
+++ a2ps-4.13/contrib/fixps.in	2006-08-08 14:53:36.000000000 +0100
be8f42
@@ -38,7 +38,6 @@
d84993
 run_gs=0
d84993
 # What action to perform: fixps, cat, check, and gs
d84993
 task=fixps
d84993
-tmpdir=/tmp/$program.$$
d84993
 verbose=echo
d84993
 
d84993
 # The version/usage strings
be8f42
@@ -183,6 +182,7 @@
be8f42
       exit 1;;
be8f42
 esac
be8f42
 
be8f42
+tmpdir=$(mktemp -d /tmp/$program.XXXXXX)
be8f42
 if test -n "$debug"; then
be8f42
   # Set -x now if debugging
be8f42
   set -x
be8f42
@@ -191,7 +191,6 @@
be8f42
   trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
be8f42
 fi
be8f42
 
be8f42
-mkdir $tmpdir
be8f42
 fixps_sed=$tmpdir/fixps.sed
be8f42
 
be8f42
 # If printing from stdin, save into a tmp file
be8f42
--- a2ps-4.13/contrib/pdiff.in.tmpdir	1999-10-24 16:07:51.000000000 +0100
be8f42
+++ a2ps-4.13/contrib/pdiff.in	2006-08-08 14:52:22.000000000 +0100
d84993
@@ -34,7 +34,7 @@
d84993
 diff_options='-u'
d84993
 file=
d84993
 output=
d84993
-tmpdir=/tmp/$program.$$
d84993
+tmpdir=$(mktemp -d /tmp/$program.XXXXXX)
d84993
 verbose=echo
d84993
 wdiff_prog=${WDIFF:-wdiff}
d84993
 wdiff_options='-w[wd- -x-wd] -y{wd+ -z+wd}'
aae0ce
--- a2ps-4.13/contrib/pdiff.in.tmpdir	1999-10-24 16:07:51.000000000 +0100
aae0ce
+++ a2ps-4.13/contrib/pdiff.in	2007-02-28 13:30:36.000000000 +0000
aae0ce
@@ -67,6 +67,7 @@
aae0ce
 
aae0ce
 help="Try \`$program --help' for more information."
aae0ce
 
aae0ce
+trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
aae0ce
 
aae0ce
 # Parse command line arguments.
aae0ce
 option_without_arguments='vhsqDlw'