Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 799 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 799 Rev 802
Line 2... Line 2...
2
# syntax:
2
# syntax:
3
# make <cible> [dbu=<bdd_utilisateur> [dbp=<bdd_mot_de_passe>]]
3
# make <cible> [dbu=<bdd_utilisateur> [dbp=<bdd_mot_de_passe>]]
4
all: test
4
all: test
Line 5... Line 5...
5
 
5
 
6
test:
6
test:
7
	test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
7
	@test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
8
	cp config.defaut.ini config.ini
8
	@cp config.defaut.ini config.ini
9
	sed -r -i -f test-conf.sed config.ini
9
	@sed -r -i -f test-conf.sed config.ini
10
	sed -r -i -f test-sous-conf.sed config_*.ini
10
	@sed -r -i -f test-sous-conf.sed config_*.ini
Line 11... Line 11...
11
	test -n "$(dbu)" -o -n "$(dbp)" && make bddconf
11
	@test -n "$(dbu)" -o -n "$(dbp)" && make bddconf || true
12
 
12
 
13
prod:
13
prod:
14
	test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
14
	@test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
15
	cp config.defaut.ini config.ini
15
	@cp config.defaut.ini config.ini
Line 16... Line 16...
16
	sed -r -i -f prod-conf.sed config.ini
16
	@sed -r -i -f prod-conf.sed config.ini
17
	test -n "$(dbu)" -o -n "$(dbp)" && make bddconf
17
	@test -n "$(dbu)" -o -n "$(dbp)" && make bddconf || true
18
 
18
 
Line 19... Line 19...
19
bddconf:
19
bddconf:
20
	test -n "$(dbu)" &&  sed -r -i "/^bdd_utilisateur/s/= .*/= \"$(dbu)\"/" config.ini || true
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