[postgis-commits] svn - r3285 - branches/1.3

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Nov 11 09:28:00 PST 2008


Author: mcayland
Date: 2008-11-11 09:27:59 -0800 (Tue, 11 Nov 2008)
New Revision: 3285

Modified:
   branches/1.3/Makefile.config.in
Log:
Change Makefile.config.in to use sed instead of cut to allow us to filter non-numeric parts of `pg_config --version` when finding the currently installed PostgreSQL version.


Modified: branches/1.3/Makefile.config.in
===================================================================
--- branches/1.3/Makefile.config.in	2008-11-10 16:35:40 UTC (rev 3284)
+++ branches/1.3/Makefile.config.in	2008-11-11 17:27:59 UTC (rev 3285)
@@ -161,7 +161,7 @@
 # 
 # pg_config --version => PostgreSQL 8.3.1
 #
-PG_VERSION_MAJOR=$(shell $(PGCONFIG) --version | cut -f2 -d' ' | cut -f1 -d.)
-PG_VERSION_MINOR=$(shell $(PGCONFIG) --version | cut -f2 -d' ' | cut -f2 -d.)
+PG_VERSION_MAJOR=$(shell $(PGCONFIG) --version | sed 's/[A-Za-z ]*\([0-9]\)\.\([0-9]\)[A-Za-z ]*/\1/')
+PG_VERSION_MINOR=$(shell $(PGCONFIG) --version | sed 's/[A-Za-z ]*\([0-9]\)\.\([0-9]\)[A-Za-z ]*/\2/')
 USE_VERSION=$(PG_VERSION_MAJOR)$(PG_VERSION_MINOR)
 



More information about the postgis-commits mailing list