Subversion Repositories eFlore/Projets.eflore-projets

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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:
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
12
 
13
prod:
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
18
 
19
bddconf:
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
22
 
23
framework:
24
	mv framework.defaut.php framework.php