]> arthur.barton.de Git - ngircd.git/commitdiff
autogen.sh: Don't use "egrep -o", use "sed"
authorAlexander Barton <alex@barton.de>
Sun, 27 Jan 2013 11:25:58 +0000 (12:25 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 13 Feb 2013 21:11:49 +0000 (22:11 +0100)
"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)

autogen.sh

index d480252683a0fc43f6f2d9133666787b2c140434..c624eeb71d7876e780b3750df0344303ae4f9c1c 100755 (executable)
@@ -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"