summary refs log tree commit diff
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2010-04-02 13:03:27 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-04-02 13:03:27 +0800
commita650e91b6e0290a6e67cd0648d86ba9e1e4a67aa (patch)
tree51400dcfa87ecd3f0db6b2a642e6869d22fa7325
parent[ARITH] Fix logical or result value (diff)
downloaddash-a650e91b6e0290a6e67cd0648d86ba9e1e4a67aa.tar.gz
dash-a650e91b6e0290a6e67cd0648d86ba9e1e4a67aa.zip
[BUILTIN] Use TMPDIR in mkbuiltins
while merging upstream dash in klibc,
noticed that klibc dash had grown that useful feature.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--ChangeLog4
-rw-r--r--src/mkbuiltins2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0802048..d57ebc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-02  maximilian attems <max@stro.at>
+
+	* Use TMPDIR in mkbuiltins.
+
 2010-03-10  Jilles Tjoelker <jilles@stack.nl>
 
 	* Fix logical or result value.
diff --git a/src/mkbuiltins b/src/mkbuiltins
index 064cb76..e38ce4c 100644
--- a/src/mkbuiltins
+++ b/src/mkbuiltins
@@ -37,7 +37,7 @@
 
 tempfile=tempfile
 if ! type tempfile > /dev/null 2>&1; then
-	tempfile='mktemp /tmp/mkbuiltins.XXXXXX'
+	tempfile="mktemp ${TMPDIR:-/tmp}/builtin.XXXXXX"
 fi
 
 trap 'rm -f $temp $temp2' EXIT