projects
/
lttng-ci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4bdd39e
)
Add version check to liburcu build
author
Michael Jeanson
<mjeanson@efficios.com>
Fri, 13 Nov 2015 19:50:54 +0000
(14:50 -0500)
committer
Michael Jeanson
<mjeanson@efficios.com>
Fri, 13 Nov 2015 19:50:54 +0000
(14:50 -0500)
scripts/liburcu/build.sh
patch
|
blob
|
blame
|
history
diff --git
a/scripts/liburcu/build.sh
b/scripts/liburcu/build.sh
index ef97773b7ba84b4895251126eecf497d46e172d8..eaf952530a15dade318160519a18af21205ca22c 100755
(executable)
--- a/
scripts/liburcu/build.sh
+++ b/
scripts/liburcu/build.sh
@@
-15,6
+15,23
@@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Version compare functions
+verlte() {
+ [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
+}
+
+verlt() {
+ [ "$1" = "$2" ] && return 1 || verlte $1 $2
+}
+
+vergte() {
+ [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ]
+}
+
+vergt() {
+ [ "$1" = "$2" ] && return 1 || vergte $1 $2
+}
+
# Create build directory
rm -rf $WORKSPACE/build
# Create build directory
rm -rf $WORKSPACE/build
@@
-70,6
+87,9
@@
esac
# Run bootstrap prior to configure
./bootstrap
# Run bootstrap prior to configure
./bootstrap
+# Get source version from configure script
+eval `grep '^PACKAGE_VERSION=' ./configure`
+
# Build type
# oot : out-of-tree build
# Build type
# oot : out-of-tree build
@@
-118,9
+138,10
@@
$MAKE install
# Run tests
$MAKE check
# Run tests
$MAKE check
-#if [ "$version" >=" 0.9" ]; then
+# Only run regtest for 0.9 and up
+if vergte "$PACKAGE_VERSION" "0.9"; then
$MAKE regtest
$MAKE regtest
-
#
fi
+fi
# Cleanup
$MAKE clean
# Cleanup
$MAKE clean
This page took
0.023489 seconds
and
4
git commands to generate.