build system cleanup. move shared include files into $(TOPDIR)/include, move lzma...
[openwrt-10.03/.git] / toolchain / sed / sedcheck.sh
1 #!/bin/sh
2
3 if [ -x /usr/bin/sed ]; then 
4     SED="/usr/bin/sed";
5 else
6     if [ -x /bin/sed ]; then 
7         SED="/bin/sed";
8     fi;
9 fi;
10
11 echo "HELLO" > .sedtest
12 $SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
13
14 case "$1" in
15         download)
16                 if [ $? != 0 ] ; then
17                         echo download-sed-binary
18                 fi;
19         ;;
20         *)
21                 if [ $? != 0 ] ; then
22                         echo build-sed-host-binary
23                 else
24                         echo use-sed-host-binary
25                 fi;
26         ;;
27 esac
28 rm -f .sedtest
29
30