Revision 2090
Added by Aaron Marcuse-Kubitza over 12 years ago
Makefile | ||
---|---|---|
26 | 26 |
|
27 | 27 |
wait := read -p $(emph)'Press ENTER to continue:'$(endEmph) REPLY |
28 | 28 |
|
29 |
confirm = $(if $(shell read -p $(emph)"$(1) (y/n)"$(endEmph) REPLY; \ |
|
30 |
test "$$REPLY" = y && echo t),,$(error Aborting)) |
|
29 |
confirm = $(if $(shell read -p $(emph)"$(1)"$(endEmph)$$'$(if\ |
|
30 |
$(2),\n$(2))\nContinue? (y/n) ' REPLY; test "$$REPLY" = y && echo t),,\ |
|
31 |
$(error Aborting)) |
|
31 | 32 |
|
32 | 33 |
# File editing |
33 | 34 |
sudoAppend = echo $$'$(2)'|sudo tee -a $(1) >/dev/null |
... | ... | |
157 | 158 |
|
158 | 159 |
#### DB and bien user |
159 | 160 |
|
160 |
confirmRmDbMsg := WARNING: This will delete your entire VegBIEN DB,\ |
|
161 |
including previous public schema versions and staging tables! Continue? |
|
162 |
confirmRmDb = $(call confirm,$(confirmRmDbMsg)) |
|
161 |
confirmRmDb = $(call confirm,WARNING: This will delete your entire VegBIEN\ |
|
162 |
DB!,This includes all public schema versions and staging tables.) |
|
163 | 163 |
|
164 |
confirmRmPublicSchemaMsg := WARNING: This will delete the current public\ |
|
165 |
schema of your VegBIEN DB! (To save it, use \`make schemas/rotate\`.) Continue? |
|
166 |
confirmRmPublicSchema = $(call confirm,$(confirmRmPublicSchemaMsg)) |
|
164 |
confirmRmPublicSchema = $(call confirm,WARNING: This will delete the current\ |
|
165 |
public schema of your VegBIEN DB!,To save it: make schemas/rotate) |
|
167 | 166 |
|
168 | 167 |
rmPublicSchema := 'DROP SCHEMA IF EXISTS public CASCADE;' |
169 | 168 |
|
Also available in: Unified diff
Makefile: $(confirm): Support a separate line outside of the highlighted line. Include the "Continue?" in the macro since all prompts include it.