+2010-11-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ bootstrap: port to Solaris sed
+ * build-aux/bootstrap (get_version): Port to Solaris sed.
+ See Ralf Wildenhues's note in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00156.html>.
+
2010-11-14 Jim Meyering <meyering@redhat.com>
maint.mk: rename variable: s/noteworthy/gl_noteworthy_news_/
$app --version >/dev/null 2>&1 || return 1
$app --version 2>&1 |
- sed -n '# extract version within line
- s/.*[v ]\{1,\}\([0-9]\{1,\}\(\.[.a-z0-9-]*\)*\).*/\1/
- t done
+ sed -n '# Move version to start of line.
+ s/.*[v ]\([0-9]\)/\1/
- # extract version at start of line
- s/^\([0-9]\{1,\}\(\.[.a-z0-9-]*\)*\).*/\1/
- t done
+ # Skip lines that do not start with version.
+ /^[0-9]/!d
- d
+ # Remove characters after the version.
+ s/[^.a-z0-9-].*//
+
+ # The first component must be digits only.
+ s/^\([0-9]*\)[a-z-].*/\1/
- :done
#the following essentially does s/5.005/5.5/
s/\.0*\([1-9]\)/.\1/g
p