Minor fix for astyle-code.sh compatibility with macOS grep

(cherry picked from commit 82206ebeaac285d68add1042e1f151857e67e53b)
This commit is contained in:
Stephen Saunders 2022-02-10 10:37:34 -05:00
parent d0d3917ba1
commit 1c6ec627f2

View file

@ -26,7 +26,7 @@ if [ -z "$ASTYLE_BIN" ]; then
ASTYLE_BIN="./astyle.$ASTYLE_SUFFIX"
fi
ASTYLE_VERSION=$($ASTYLE_BIN --version | grep -o -e "[[:digit:]\.]*")
ASTYLE_VERSION=$($ASTYLE_BIN --version | grep -o -e "[[:digit:]\.]*$")
if [ "$ASTYLE_VERSION" != "$OUR_ASTYLE_VERSION" ]; then
echo "ERROR: $ASTYLE_BIN has version $ASTYLE_VERSION, but we want $OUR_ASTYLE_VERSION"