Make sed usage more compatible

... and a bit less safe

Might close #35
This commit is contained in:
Sandro Santilli 2014-06-04 15:11:30 +02:00
parent 9322cecb3d
commit ca07c81f13
2 changed files with 2 additions and 14 deletions

View File

@ -50,7 +50,7 @@ include $(PGXS)
$(EXTENSION)--$(EXTVERSION).sql: $(CDBSCRIPTS) cartodb_version.sql Makefile
echo '\echo Use "CREATE EXTENSION $(EXTENSION)" to load this file. \quit' > $@
cat $(CDBSCRIPTS) | \
$(SED) -e 's/\<public\./cartodb./g' \
$(SED) -e 's/public\./cartodb./g' \
-e 's/:DATABASE_USERNAME/cdb_org_admin/g' >> $@
echo "GRANT USAGE ON SCHEMA cartodb TO public;" >> $@
cat cartodb_version.sql >> $@
@ -82,7 +82,7 @@ legacy_regress: $(REGRESS_OLD) Makefile
echo '\\t' >> $${of}; \
echo '\\set QUIET off' >> $${of}; \
cat $${f} | \
$(SED) -e 's/\<public\./cartodb./g' >> $${of}; \
$(SED) -e 's/public\./cartodb./g' >> $${of}; \
exp=expected/test/$${tn}.out; \
echo '\\set ECHO off' > $${exp}; \
cat test/$${tn}_expect >> $${exp}; \

View File

@ -102,15 +102,3 @@ Starting with 0.2.0, the in-place reload can be done with an ad-hoc function:
SELECT cartodb.cdb_extension_reload();
```
Troubleshooting
---------------
### Mac OS X sed
Mac OS X comes with sed from FreeBSD, some scripting in Makefile is
incompatible with that version of sed so we recommend you to install
GNU sed. The easiest way is via [Homebrew](http://brew.sh/) like in:
```sh
brew install gnu-sed --default-names
```