diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-11-19 17:17:56 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-11-19 17:17:56 +0000 |
commit | 4f889ada561fbdffeefa1a8327d5b8939b021685 (patch) | |
tree | 925b247ee7718930f470b2c1843cb15e80a045dd /sources/sedcheck.sh | |
parent | 93b677ea4256da1236ae5c4a14b78010e60266d9 (diff) | |
download | buildroot-novena-4f889ada561fbdffeefa1a8327d5b8939b021685.tar.gz buildroot-novena-4f889ada561fbdffeefa1a8327d5b8939b021685.zip |
automatically detect if we have a usable version of sed
installed. If not, we will now build our own version.
Diffstat (limited to 'sources/sedcheck.sh')
-rwxr-xr-x | sources/sedcheck.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sources/sedcheck.sh b/sources/sedcheck.sh new file mode 100755 index 000000000..f6fcebd94 --- /dev/null +++ b/sources/sedcheck.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ -x /usr/bin/sed ]; then + SED="/usr/bin/sed"; +else + if [ -x /bin/sed ]; then + SED="/bin/sed"; + fi; +fi; + +echo "HELLO" > .sedtest +$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1 + +if [ $? != 0 ] ; then + rm -f .sedtest + echo build-sed-host-binary +fi; +rm -f .sedtest +echo use-sed-host-binary + + |