diff options
author | Joe Orton <jorton@apache.org> | 2004-06-30 16:08:09 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-06-30 16:08:09 +0000 |
commit | 75c0a74d318b79c36bd4eb6a311da201989aff55 (patch) | |
tree | 3545a70f1c6ba9fe1aafbd300e58155731c0fb95 | |
parent | a3921992d650e0646b7207147cbecb8e0496c26b (diff) | |
download | apr-75c0a74d318b79c36bd4eb6a311da201989aff55.tar.gz |
* build/get-version.sh: Fix handling of multi-digit version
components.
Submitted by: Joe Schaefer <joe+gmane sunstarsys.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65253 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-x | build/get-version.sh | 10 |
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`" |