clean-tables target

This commit is contained in:
2021-05-19 22:57:46 +03:00
committed by Motiejus Jakštys
parent 8db38ac2a4
commit b72905989e
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 $@