Fix backslashes in generated files
Fixes #213 Some systems treat escaping of text passed to the echo command from a Makefile differently. This seems to work for our needs.
This commit is contained in:
parent
224b2ce395
commit
a0bb7b1b03
13
Makefile
13
Makefile
@ -116,6 +116,9 @@ $(EXTENSION).control: $(EXTENSION).control.in Makefile
|
|||||||
cartodb_version.sql: cartodb_version.sql.in Makefile $(GITDIR)/index
|
cartodb_version.sql: cartodb_version.sql.in Makefile $(GITDIR)/index
|
||||||
$(SED) -e 's/@@VERSION@@/$(EXTVERSION)/' $< > $@
|
$(SED) -e 's/@@VERSION@@/$(EXTVERSION)/' $< > $@
|
||||||
|
|
||||||
|
# Needed for consistent `echo` results with backslashes
|
||||||
|
SHELL = bash
|
||||||
|
|
||||||
legacy_regress: $(REGRESS_OLD) Makefile
|
legacy_regress: $(REGRESS_OLD) Makefile
|
||||||
mkdir -p sql/test/
|
mkdir -p sql/test/
|
||||||
mkdir -p expected/test/
|
mkdir -p expected/test/
|
||||||
@ -123,14 +126,14 @@ legacy_regress: $(REGRESS_OLD) Makefile
|
|||||||
for f in $(REGRESS_OLD); do \
|
for f in $(REGRESS_OLD); do \
|
||||||
tn=`basename $${f} .sql`; \
|
tn=`basename $${f} .sql`; \
|
||||||
of=sql/test/$${tn}.sql; \
|
of=sql/test/$${tn}.sql; \
|
||||||
echo '\\set ECHO none' > $${of}; \
|
echo '\set ECHO none' > $${of}; \
|
||||||
echo '\\a' >> $${of}; \
|
echo '\a' >> $${of}; \
|
||||||
echo '\\t' >> $${of}; \
|
echo '\t' >> $${of}; \
|
||||||
echo '\\set QUIET off' >> $${of}; \
|
echo '\set QUIET off' >> $${of}; \
|
||||||
cat $${f} | \
|
cat $${f} | \
|
||||||
$(SED) -e 's/public\./cartodb./g' >> $${of}; \
|
$(SED) -e 's/public\./cartodb./g' >> $${of}; \
|
||||||
exp=expected/test/$${tn}.out; \
|
exp=expected/test/$${tn}.out; \
|
||||||
echo '\\set ECHO none' > $${exp}; \
|
echo '\set ECHO none' > $${exp}; \
|
||||||
cat test/$${tn}_expect >> $${exp}; \
|
cat test/$${tn}_expect >> $${exp}; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user