[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 6f06a65: Gnulib's bootstrap script updated
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 6f06a65: Gnulib's bootstrap script updated |
Date: |
Fri, 18 Nov 2016 01:07:19 +0000 (UTC) |
branch: master
commit 6f06a652704184d776512dd1b9aaa0bbce08ced9
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Gnulib's bootstrap script updated
In Gnulib's commit 4f9007e (bootstrap: Fix get_version() for AIX 5.3), the
`bootstrap' script was updated.
---
bootstrap | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/bootstrap b/bootstrap
index f060bab..5d3c289 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2016-01-24.06; # UTC
+scriptversion=2016-11-03.18; # UTC
# Bootstrap this package from checked-out sources.
@@ -418,28 +418,30 @@ sort_ver() { # sort -V is not generally available
done
}
-get_version() {
- app=$1
+get_version_sed='
+# Move version to start of line.
+s/.*[v ]\([0-9]\)/\1/
- $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+# Skip lines that do not start with version.
+/^[0-9]/!d
- $app --version 2>&1 |
- sed -n '# Move version to start of line.
- s/.*[v ]\([0-9]\)/\1/
+# Remove characters after the version.
+s/[^.a-z0-9-].*//
- # Skip lines that do not start with version.
- /^[0-9]/!d
+# The first component must be digits only.
+s/^\([0-9]*\)[a-z-].*/\1/
- # Remove characters after the version.
- s/[^.a-z0-9-].*//
+#the following essentially does s/5.005/5.5/
+s/\.0*\([1-9]\)/.\1/g
+p
+q'
- # The first component must be digits only.
- s/^\([0-9]*\)[a-z-].*/\1/
+get_version() {
+ app=$1
+
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
- #the following essentially does s/5.005/5.5/
- s/\.0*\([1-9]\)/.\1/g
- p
- q'
+ $app --version 2>&1 | sed -n "$get_version_sed"
}
check_versions() {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 6f06a65: Gnulib's bootstrap script updated,
Mohammad Akhlaghi <=