Skip to content

Commit

Permalink
Protoc check - correctly match multi-digit major versions
Browse files Browse the repository at this point in the history
(cherry picked from commit 69a2946)
  • Loading branch information
peternewman committed Jul 7, 2023
1 parent d4414fe commit 546d9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/ola.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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/'`]
Expand Down

0 comments on commit 546d9ee

Please sign in to comment.