Project

General

Profile

« Previous | Next » 

Revision 4454

input.Makefile: sql/install: Log the installation of a full-DB export to a log file in the main dir

View differences:

inputs/input.Makefile
192 192
rm_schema: _always
193 193
	echo 'DROP SCHEMA IF EXISTS "$(datasrc)" CASCADE;'|$(psqlAsBien)
194 194

  
195
logInstall = $(if $(log),$(if $(quiet),&>,2>&1|tee )$*/logs/install.log.sql)
195
logInstall = $(if $(log),$(if $(quiet),&>,2>&1|tee )$(1)install.log.sql)
196 196

  
197 197
# Must come before %/install to override it
198 198
sql/install: $(dbExports)
199
	($(inDatasrc); cat $+|grep -vF 'SET search_path')|"time" $(psqlAsBien)
199
	($(inDatasrc); cat $+|grep -vF 'SET search_path')|"time" $(psqlAsBien)\
200
$(logInstall)
200 201

  
201 202
# The export must be created with:
202 203
# `--compatible=postgresql --add-locks=false --set-charset --no-create-info`
......
235 236
	$(if $(nonXml),$(import_install_),$(if $(isRef),$(exportHeader)))
236 237
import_install_ = (prefix=; . $(bin)/vegbien_dest; "time" nice -n +5\
237 238
env schema=$(datasrc) table=$* has_row_num=$(hasRowNum) $(bin)/csv2db\
238
$(catSrcs) $(logInstall))
239
$(catSrcs) $(call logInstall,$*/logs/))
239 240

  
240 241
##### Maps building
241 242

  

Also available in: Unified diff