mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@googlemail.com>
To: ptxdist@pengutronix.de
Cc: Alexander Aring <alex.aring@gmail.com>
Subject: [ptxdist] [PATCH] configure.ac: change regex for sed version
Date: Mon,  7 Jan 2013 23:36:05 +0100	[thread overview]
Message-ID: <1357598165-27065-1-git-send-email-alex.aring@gmail.com> (raw)

Change regex for sed version in configure.ac.

This regex will match only on the first line and doesn't
look for a 'version' pattern which is not available in
sed version 4.2.2.

The new regex will match in the first line of 'sed --version' in a pattern
which starts with random character sequence(or zero) followed by whitespace
character and several digits of pattern x.x....x which x is a number.
This pattern will be save in the SED_VERSION variable.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d4c83b8..4d27a60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,7 +116,7 @@ if test -z "$SED"; then
 fi
 
 AC_MSG_CHECKING([sed version])
-SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "s/.*version \([[0-9\.]]*\)/\1/p"`
+SED_VERSION=`$SED --version 2>/dev/null | $SED -ne "1 s/.*\s\([[0-9\+\.]]\+\).*/\1/p"`
 case "$SED_VERSION" in
 3.*) AC_MSG_ERROR([we need at least GNU sed 4.x but found $SED_VERSION]) ;;
 4.*) ;;
-- 
1.8.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2013-01-07 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 22:36 Alexander Aring [this message]
2013-01-08  8:47 ` Marc Kleine-Budde
2013-01-08  8:48 ` Marc Kleine-Budde
2013-01-08 10:50   ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357598165-27065-1-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@googlemail.com \
    --cc=alex.aring@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox