From: Peter Korsgaard Date: Mon, 21 Jun 2010 20:33:51 +0000 (+0200) Subject: check-host-sed.sh: use mktemp for temporary file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bec3480a4403d8b666e7b04348306b49202ffac5;p=buildroot.git check-host-sed.sh: use mktemp for temporary file Signed-off-by: Peter Korsgaard --- diff --git a/toolchain/dependencies/check-host-sed.sh b/toolchain/dependencies/check-host-sed.sh index 188b7210b7..ed9a1d4dbd 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