summaryrefslogtreecommitdiff
path: root/sources/sedcheck.sh
blob: f6fcebd949625860669cef42452e132637d9a1e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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