diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-11-04 22:39:28 +1100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-11-04 22:39:28 +1100 |
commit | 3c98399cdf8d376b2c1ebd9cd32ca5d8c84f3ac9 (patch) | |
tree | 581686eabf8207f594c3802b1897930113861fb6 /src/mkbuiltins | |
parent | [JOBS] Fixed support for disabling job control (diff) | |
download | dash-3c98399cdf8d376b2c1ebd9cd32ca5d8c84f3ac9.tar.gz dash-3c98399cdf8d376b2c1ebd9cd32ca5d8c84f3ac9.zip |
[HELPER] Use mktemp if tempfile is not available
tempfile(1) is Debian-specific so let's use mktemp(1) as a fallback.
Diffstat (limited to 'src/mkbuiltins')
-rw-r--r-- | src/mkbuiltins | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mkbuiltins b/src/mkbuiltins index 5e2cc86..f3f91c5 100644 --- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -35,9 +35,14 @@ # # @(#)mkbuiltins 8.2 (Berkeley) 5/4/95 +tempfile=tempfile +if ! type tempfile > /dev/null 2>&1; then + tempfile=mktemp +fi + trap 'rm -f $temp $temp2' EXIT -temp=$(tempfile) -temp2=$(tempfile) +temp=$($tempfile) +temp2=$($tempfile) builtins=$1 |