From 546d9ee8d970c4e5b33d9d28b4acf6eb34f27a5d Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 7 Jul 2023 16:14:21 +0100 Subject: [PATCH] Protoc check - correctly match multi-digit major versions (cherry picked from commit 69a2946622cdfce54cb6ed7f2210df2be0ec5576) Signed-off-by: James Hilliard Upstream: https://github.com/OpenLightingProject/ola/commit/546d9ee8d970c4e5b33d9d28b4acf6eb34f27a5d --- config/ola.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ola.m4 b/config/ola.m4 index 51b6c825c..eacee5d94 100644 --- a/config/ola.m4 +++ b/config/ola.m4 @@ -51,7 +51,7 @@ elif test -n "$1" ; then # libprotoc 2.4.1 # libprotoc 23.3 # The first sed ensures all versions have major, minor, patch, by adding a .0 on the end of ones missing it - [protoc_version=`$PROTOC --version 2>&1 | grep 'libprotoc' | sed 's/\([^\.0-9][0-9][0-9]*\.[0-9][0-9]*\)$/\1\.0/g' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] + [protoc_version=`$PROTOC --version 2>&1 | grep 'libprotoc' | sed 's/\([^\.0-9][0-9][0-9]*\.[0-9][0-9]*\)$/\1\.0/g' | sed 's/[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] [required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] -- 2.34.1