799 |
raphael |
1 |
# installation de l'espace de test
|
|
|
2 |
# syntax:
|
|
|
3 |
# make <cible> [dbu=<bdd_utilisateur> [dbp=<bdd_mot_de_passe>]]
|
|
|
4 |
all: test
|
|
|
5 |
|
|
|
6 |
test:
|
802 |
raphael |
7 |
@test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
|
|
|
8 |
@cp config.defaut.ini config.ini
|
|
|
9 |
@sed -r -i -f test-conf.sed config.ini
|
|
|
10 |
@sed -r -i -f test-sous-conf.sed config_*.ini
|
|
|
11 |
@test -n "$(dbu)" -o -n "$(dbp)" && make bddconf || true
|
799 |
raphael |
12 |
|
|
|
13 |
prod:
|
802 |
raphael |
14 |
@test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
|
|
|
15 |
@cp config.defaut.ini config.ini
|
|
|
16 |
@sed -r -i -f prod-conf.sed config.ini
|
|
|
17 |
@test -n "$(dbu)" -o -n "$(dbp)" && make bddconf || true
|
799 |
raphael |
18 |
|
|
|
19 |
bddconf:
|
802 |
raphael |
20 |
@test -n "$(dbu)" && sed -r -i "/^bdd_utilisateur/s/= .*/= \"$(dbu)\"/" config.ini || true
|
|
|
21 |
@test -n "$(dbp)" && sed -r -i "/^bdd_mot_de_passe/s/= .*/= \"$(dbp)\"/" config.ini || true
|
799 |
raphael |
22 |
|
|
|
23 |
framework:
|
802 |
raphael |
24 |
@mv framework.defaut.php framework.php
|
|
|
25 |
|
|
|
26 |
cache:
|
|
|
27 |
@cache=$(shell sed -n '/chemin_cache/s/.*= *//p' config.ini)
|
|
|
28 |
@test -n "$(cache)" && mkdir -p $(cache) || true
|