summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviljk/dvihp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-17 00:31:59 +0000
committerKarl Berry <karl@freefriends.org>2018-01-17 00:31:59 +0000
commit90ac78de0e71679de5b2b4282983f09cb00257e1 (patch)
tree6a26127c7722c6526f2224c8ad0dc4a2cb748951 /Build/source/texk/dviljk/dvihp
parent1b0665f4e9eb50d4e45f264e5ff3b6b88611605f (diff)
use mktemp instead of simple tempdir, per Debian
git-svn-id: svn://tug.org/texlive/trunk@46340 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dviljk/dvihp')
-rwxr-xr-xBuild/source/texk/dviljk/dvihp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Build/source/texk/dviljk/dvihp b/Build/source/texk/dviljk/dvihp
index fdaf3fb87bf..03a2dbe9605 100755
--- a/Build/source/texk/dviljk/dvihp
+++ b/Build/source/texk/dviljk/dvihp
@@ -6,14 +6,11 @@
: ${DVILJ=dvilj4} # the dvilj variant to run
: ${SPOOL=lpr} # used to print an LJ file
-: ${TMPDIR=${TEMP-${TMP-/tmp}}} # for the dvicopy output
-tmpdir="${TMPDIR}"/dvihp$$
-(umask 077; mkdir "$tmpdir") \
+tmpdir=`mktemp -d` \
|| { echo "cannot create directory \`$tmpdir'."; exit 1; }
trap '
- cd "${TMPDIR}"
test -d "$tmpdir" && { rm -f "$tmpdir"/*; rmdir "$tmpdir"; }
exit 0
' 0 1 2 3 6 7 13 15