Project

General

Profile

« Previous | Next » 

Revision 246

scripts/Makefile: Use bien MySQL user for installing inputs

View differences:

scripts/Makefile
67 67
psqlOpts = --set ON_ERROR_STOP=1 --quiet
68 68
asPostgresAdmin = sudo -u postgres
69 69
psqlAsAdmin = $(asPostgresAdmin) psql $(psqlOpts)
70
psqlAsDbUser = ./util/psql_vegbien $(psqlOpts)
70
psqlAsBien = ./util/psql_vegbien $(psqlOpts)
71 71
bienPassword = $(shell cat util/bien_password)
72 72

  
73 73
postgres_user: _not_file
......
93 93
reinstall_db: _not_file rm_db db
94 94

  
95 95
empty_db: _not_file
96
	$(psqlAsDbUser) <../mappings/schemas/vegbien_empty.sql
96
	$(psqlAsBien) <../mappings/schemas/vegbien_empty.sql
97 97

  
98 98
#####
99 99

  
......
140 140

  
141 141
#####
142 142

  
143
ifneq ($(filter %_with_mysql_password,$(MAKECMDGOALS)),)
144
mysqlAdminPassword ?= $(call getPassword,MySQL $(USER) user)
145
endif
143
mysqlAsBien = mysql --user=bien --password='$(bienPassword)'
146 144

  
147
with_mysql_password = $(MAKE) $@_with_mysql_password
148

  
149 145
#####
150 146

  
151
mysqlAsUser = mysql --user='$(USER)' --password='$(mysqlAdminPassword)'
147
inputs: _not_file $(wildcard ../../inputs/*/)
152 148

  
153
inputs: _not_file
154
	$(with_mysql_password)
155
# use sub-make
156
inputs_with_mysql_password: _not_file $(wildcard ../../inputs/*/)
157

  
158 149
#####
159 150

  
160 151
test: _not_file test-map

Also available in: Unified diff