Revision 6915
Added by Aaron Marcuse-Kubitza almost 12 years ago
Makefile | ||
---|---|---|
11 | 11 |
# Paths |
12 | 12 |
bin := bin |
13 | 13 |
|
14 |
# Terminal |
|
15 |
esc := '[' |
|
16 |
reset := $(esc)'0m' |
|
17 |
emph := $(esc)'7m ' |
|
18 |
endEmph := ' '$(reset) |
|
19 |
|
|
20 |
# User interaction |
|
21 |
|
|
22 |
done = echo; echo $(emph)"Finished $@"$(endEmph); echo |
|
23 |
|
|
24 |
wait := read -p $(emph)'Press ENTER to continue:'$(endEmph) REPLY |
|
25 |
|
|
26 |
confirm = $(if $(shell read -p $(emph)"$(1)"$(endEmph)$$'$(if\ |
|
27 |
$(2),\n$(2))\nContinue? (y/n) ' REPLY; test "$$REPLY" = y && echo t),,\ |
|
28 |
$(error Aborting)) |
|
29 |
|
|
30 |
# File editing |
|
31 |
sudoAppend = echo $$'$(2)'|sudo tee -a $(1) >/dev/null |
|
32 |
|
|
33 |
# DB |
|
34 |
mkSchemaCmd = 'CREATE SCHEMA $(1);' |
|
35 |
rmSchemaCmd = 'DROP SCHEMA IF EXISTS "$(1)" CASCADE;' |
|
36 |
|
|
37 | 14 |
##### Environment |
38 | 15 |
|
39 | 16 |
export PGOPTIONS = --client-min-messages=WARNING |
Also available in: Unified diff
Makefiles: Factored out common vars/functions into lib/common.Makefile