Ticket #1527 (closed defect: invalid)
extensions/postgis/topology/Makefile.in uses non-POSIX [[ in makefile
| Reported by: | gdt | Owned by: | strk |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | build/upgrade/install | Version: | trunk |
| Keywords: | Cc: |
Description
The [[ construct is beyond POSIX specifications, and not all shells implement it. Even if so, there is no standard for the behavior.
The following diff helps, but because there are underlying issues with revisions not being numeric, it doesn't work (but I think it fixes the [[ issue).
Index: Makefile.in
===================================================================
--- Makefile.in (revision 9010)
+++ Makefile.in (working copy)
@@ -72,14 +72,14 @@
sql_minor_upgrade: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/topology_upgrade_minor.sql sql_bits/topology_comments.sql ../postgis_extension_helper_uninstall.sql
if test "$(PREREL_NUMBER)x" != "x"; then \
v=$(PREREL_PREV); \
- while [[ $$v -ge 1 ]]; do \
+ while [ "$$v" -ge 1 ]; do \
cat $< > sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql; \
v=$$(($$v-1)); \
done; \
else \
if test $(MICRO_NUMBER) -gt 0; then \
v=0; \
- while [[ $$v -le $(MICRO_PREV) ]]; do \
+ while [ "$$v" -le "$(MICRO_PREV)" ]; do \
cat $< > sql/$(EXTENSION)--$(MINORVERSION).$(PREREL_PREFIX)$$v--$(EXTVERSION).sql; \
v=$$(($$v+1)); \
done; \
Change History
Note: See
TracTickets for help on using
tickets.
