You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/06/30 18:08:10 UTC
cvs commit: apr/build get-version.sh
jorton 2004/06/30 09:08:10
Modified: build get-version.sh
Log:
* build/get-version.sh: Fix handling of multi-digit version
components.
Submitted by: Joe Schaefer <joe+gmane sunstarsys.com>
Revision Changes Path
1.4 +5 -5 apr/build/get-version.sh
Index: get-version.sh
===================================================================
RCS file: /home/cvs/apr/build/get-version.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -d -w -u -r1.3 -r1.4
--- get-version.sh 10 Sep 2002 09:11:20 -0000 1.3
+++ get-version.sh 30 Jun 2004 16:08:09 -0000 1.4
@@ -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`"