summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild/get-version.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/build/get-version.sh b/build/get-version.sh
index c29bceb01..fd685b22a 100755
--- a/build/get-version.sh
+++ b/build/get-version.sh
@@ -12,14 +12,14 @@
#
if test $# != 3; then
- echo "USAGE: $0 CMD INCLUDEDIR PREFIX"
- echo " where CMD is one of: all, major"
+ echo "USAGE: $0 CMD VERSION_HEADER PREFIX"
+ echo " where CMD is one of: all, major, libtool"
exit 1
fi
-major_sed="/#define.*$3_MAJOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
-minor_sed="/#define.*$3_MINOR_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
-patch_sed="/#define.*$3_PATCH_VERSION/s/^.*\([0-9][0-9]*\).*$/\1/p"
+major_sed="/#define.*$3_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
+minor_sed="/#define.*$3_MINOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
+patch_sed="/#define.*$3_PATCH_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p"
major="`sed -n $major_sed $2`"
minor="`sed -n $minor_sed $2`"
patch="`sed -n $patch_sed $2`"