summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-06-21 22:33:51 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-06-21 23:02:31 +0200
commitbec3480a4403d8b666e7b04348306b49202ffac5 (patch)
tree0660e71d2f12c45d3af1ecc83c022bf2bee91474
parentb50fedbcd3f7badd8f33f163162ed4ae6224982e (diff)
check-host-sed.sh: use mktemp for temporary file
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rwxr-xr-xtoolchain/dependencies/check-host-sed.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/toolchain/dependencies/check-host-sed.sh b/toolchain/dependencies/check-host-sed.sh
index 188b7210b..ed9a1d4db 100755
--- a/toolchain/dependencies/check-host-sed.sh
+++ b/toolchain/dependencies/check-host-sed.sh
@@ -12,9 +12,10 @@ do
fi
fi
- echo "HELLO" > .sedtest
- $SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
- RESULT=$(cat .sedtest)
+ tmp=$(mktemp)
+ echo "HELLO" > $tmp
+ $SED -i -e "s/HELLO/GOODBYE/" $tmp >/dev/null 2>&1
+ RESULT=$(cat $tmp)
if test $? != 0 ; then
SED=""
@@ -26,7 +27,7 @@ do
SED=""
fi
- rm -f .sedtest
+ rm -f $tmp
if [ ! -z "$SED" ] ; then
break
fi