From: Regina Obe Date: Sat, 15 Dec 2012 08:09:07 +0000 (+0000) Subject: #2147 upgrade topology doesn't work on Mac BSD sed doesn't default to extended. ... X-Git-Tag: 2.1.0beta2~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c24d0a81a0b7fc6f11f2e80679fce970fe6b85ed;p=postgis #2147 upgrade topology doesn't work on Mac BSD sed doesn't default to extended. Use already perl built topology upgrade script instead as template for extension upgrade git-svn-id: http://svn.osgeo.org/postgis/trunk@10848 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index 078ccaf69..19608a1db 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -3,6 +3,7 @@ include ../upgradeable_versions.mk EXTENSION = postgis_topology EXTVERSION = @POSTGIS_LIB_VERSION@ MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +PGIS_MAJ_MIN=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@ MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed "s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/") PREREL_NUMBER = $(shell echo $(EXTVERSION) | \ @@ -83,10 +84,8 @@ sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/topology--unpackaged.s #aggregates are special #they can be dropped but we need to remove #them from the extension first -sql/topology_upgrade_minor.sql: sql_bits/topology.sql - sed -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \ - -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\)/,/\;/d' \ - $< > $@ +sql/topology_upgrade_minor.sql: ../../topology/topology_upgrade_$(PGIS_MAJ_MIN)_minor.sql + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' -e '/^CREATE SCHEMA/d;' $< > $@ sql_minor_upgrade: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/topology_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/topology_comments.sql ../postgis_extension_helper_uninstall.sql for OLD_VERSION in $(UPGRADEABLE_VERSIONS); do \