From bec3480a4403d8b666e7b04348306b49202ffac5 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 21 Jun 2010 22:33:51 +0200 Subject: check-host-sed.sh: use mktemp for temporary file Signed-off-by: Peter Korsgaard --- toolchain/dependencies/check-host-sed.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'toolchain') 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 -- cgit v1.2.3