clean-tables target

This commit is contained in:
Motiejus Jakštys
2021-03-23 18:40:25 +02:00
parent 728665e590
commit 25150f1cbd
2 changed files with 19 additions and 12 deletions

View File

@@ -9,10 +9,17 @@ test: tests.sql .faux.db
test-integration: .faux_filter-rivers
./db -f tests-integration.sql
.PHONY: clean
clean:
-./db stop
-rm .faux_filter-rivers .faux_import-osm .faux.db
.PHONY: clean-tables
clean-tables:
for t in $$(./db -c '\dt' | awk '/demo_|integ_/{print $$3}'); do \
./db -c "drop table $$t"; \
done
.faux_filter-rivers: .faux_import-osm
./db -v where="$(WHERE)" -f aggregate-rivers.sql
touch $@