summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2017-08-15 01:53:07 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2017-08-15 01:53:07 +0000
commit8819412ab86028a654cc36e03fb9f08a6555df37 (patch)
treebdac0912c35e6b34f39ed3d0f761fc2aa3c8140a /sys/kern
parent1a6489f1fda933b5c56299bb9e563d512a9ad596 (diff)
create a temp directory for all the temp files instead of trying to name
them one at a time. solves a problem where .d files were showing up with static names. ok deraadt
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/genassym.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh
index 53110899eaa..02f05509b96 100644
--- a/sys/kern/genassym.sh
+++ b/sys/kern/genassym.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.sh,v 1.12 2014/07/05 07:18:33 jsg Exp $
+# $OpenBSD: genassym.sh,v 1.13 2017/08/15 01:53:06 tedu Exp $
# $NetBSD: genassym.sh,v 1.9 1998/04/25 19:48:27 matthias Exp $
#
@@ -38,12 +38,12 @@ else
ccode=0
fi
-TMPC=`mktemp /tmp/genassym_c.XXXXXXXXXX` || exit 1
-TMP=`mktemp /tmp/genassym.XXXXXXXXXX` || {
- rm -f ${TMPC}
- exit 1
-}
-trap "rm -f $TMPC $TMP" 0 1 2 3 15
+WRKDIR=`mktemp -d /tmp/genassym_XXXXXXXXXX` || exit 1
+
+TMPC=${WRKDIR}/genassym.c
+TMP=${WRKDIR}/genassym
+
+trap "rm -rf $WRKDIR" 0 1 2 3 15
$awk '
BEGIN {