From: Matthew Fernandez Date: Sun, 21 Feb 2021 05:06:34 +0000 (-0800) Subject: remove use of sed hacks in autogen.sh to get version components X-Git-Tag: 2.47.0~36^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46fadbefa1c7810513129051c8fa01a506316e6e;p=graphviz remove use of sed hacks in autogen.sh to get version components --- diff --git a/autogen.sh b/autogen.sh index 9c0689ac0..87a199b1f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,9 +4,9 @@ if ! GRAPHVIZ_VERSION=$( python3 gen_version.py ) ; then echo "Error: Failed to set version" >&2 exit 1 fi -GRAPHVIZ_VERSION_MAJOR=$( echo $GRAPHVIZ_VERSION | sed 's/\([^\.]*\).*/\1/' ) -GRAPHVIZ_VERSION_MINOR=$( echo $GRAPHVIZ_VERSION | sed 's/[^\.]*\.\([^\.]*\).*/\1/' ) -GRAPHVIZ_VERSION_PATCH=$( echo $GRAPHVIZ_VERSION | sed 's/[^\.]*\.[^\.]*\.//' ) +GRAPHVIZ_VERSION_MAJOR=$( python3 gen_version.py --major ) +GRAPHVIZ_VERSION_MINOR=$( python3 gen_version.py --minor ) +GRAPHVIZ_VERSION_PATCH=$( python3 gen_version.py --patch ) if ! GRAPHVIZ_GIT_DATE=$( python3 gen_version.py --committer-date-iso ) ; then echo "Error: Failed to set date" >&2