diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2010-06-21 22:33:51 +0200 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-06-21 23:02:31 +0200 |
commit | bec3480a4403d8b666e7b04348306b49202ffac5 (patch) | |
tree | 0660e71d2f12c45d3af1ecc83c022bf2bee91474 /toolchain/dependencies/check-host-sed.sh | |
parent | b50fedbcd3f7badd8f33f163162ed4ae6224982e (diff) | |
download | buildroot-novena-bec3480a4403d8b666e7b04348306b49202ffac5.tar.gz buildroot-novena-bec3480a4403d8b666e7b04348306b49202ffac5.zip |
check-host-sed.sh: use mktemp for temporary file
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/dependencies/check-host-sed.sh')
-rwxr-xr-x | toolchain/dependencies/check-host-sed.sh | 9 |
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 |