commit 79c5de0172174aa0248edd1e399fc25f6668fd1e parent 30b8848a9f01cc2b75704df044d15177acdfb329 Author: Ricardo Mones <ricardo@mones.org> Date: Wed, 20 Mar 2013 22:32:25 +0100 Use awk instead of cut Create less processes to obtain these numbers and fix the value set to EXTRA_VERSION on releases. Diffstat:
| M | configure.ac | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac @@ -13,10 +13,10 @@ EXTRA_RELEASE= EXTRA_GTK2_VERSION= GIT_VERSION=`git describe --abbrev=6 --dirty --always` -MAJOR_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f1 -d.` -MINOR_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f2 -d.` -MICRO_VERSION=`echo $GIT_VERSION | cut -f1 -d- | cut -f3 -d.` -EXTRA_VERSION=`echo $GIT_VERSION | cut -f2 -d-` +MAJOR_VERSION=`echo $GIT_VERSION | awk -F. '{print $1}'` +MINOR_VERSION=`echo $GIT_VERSION | awk -F. '{print $2}'` +MICRO_VERSION=`echo $GIT_VERSION | awk -F- '{print $1}' | awk -F. '{print $3}'` +EXTRA_VERSION=`echo $GIT_VERSION | awk -F- '{print $2}'` if test \( "x$EXTRA_VERSION" != "x" \); then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}