From: Alexander Barton Date: Sun, 27 Jan 2013 11:25:58 +0000 (+0100) Subject: autogen.sh: Don't use "egrep -o", use "sed" X-Git-Tag: rel-20.2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84612fe773ee57d57822107bb65671def135db30;p=ngircd autogen.sh: Don't use "egrep -o", use "sed" "egrep -o" isn't portable and not available on OpenBSD, for example. So let's use sed instead to get the automake version. The expression used now is less specific but should work as well ... (cherry picked from commit 419ff38a07cb0b1637b444c96cd6868a7a9e5524) --- diff --git a/autogen.sh b/autogen.sh index d4802526..c624eeb7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -153,7 +153,7 @@ echo "Searching for required tools ..." [ -z "$AUTOMAKE" ] && Notfound automake [ -z "$AUTOCONF" ] && Notfound autoconf -AM_VERSION=`$AUTOMAKE --version|head -n 1|egrep -o "([1-9]\.[0-9]+(\.[0-9]+)*)"` +AM_VERSION=`$AUTOMAKE --version | head -n 1 | sed -e 's/.* //g'` ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs AM_MAJOR="$1"; AM_MINOR="$2"; AM_PATCHLEVEL="$3"