summaryrefslogtreecommitdiffstats
path: root/contrib/groff/gendef.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/groff/gendef.sh')
-rw-r--r--contrib/groff/gendef.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/groff/gendef.sh b/contrib/groff/gendef.sh
index e2b2575..de32279 100644
--- a/contrib/groff/gendef.sh
+++ b/contrib/groff/gendef.sh
@@ -11,7 +11,11 @@ do
#define $def"
done
-t=/tmp/groff.$$
+# Use $TMPDIR if defined. Default to cwd, for non-Unix systems
+# which don't have /tmp on each drive (we are going to remove
+# the file before we exit anyway). Put the PID in the basename,
+# since the extension can only hold 3 characters on MS-DOS.
+t=${TMPDIR-.}/gro$$.tmp
sed -e 's/=/ /' >$t <<EOF
$defs
OpenPOWER on IntegriCloud