Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 802 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

# installation de l'espace de test
# syntax:
# make <cible> [dbu=<bdd_utilisateur> [dbp=<bdd_mot_de_passe>]]
all: test

test:
        test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
        cp config.defaut.ini config.ini
        sed -r -i -f test-conf.sed config.ini
        sed -r -i -f test-sous-conf.sed config_*.ini
        test -n "$(dbu)" -o -n "$(dbp)" && make bddconf

prod:
        test '!' -e config.ini || { echo "config.ini exists"; exit 1; }
        cp config.defaut.ini config.ini
        sed -r -i -f prod-conf.sed config.ini
        test -n "$(dbu)" -o -n "$(dbp)" && make bddconf

bddconf:
        test -n "$(dbu)" &&  sed -r -i "/^bdd_utilisateur/s/= .*/= \"$(dbu)\"/" config.ini || true
        test -n "$(dbp)" &&  sed -r -i "/^bdd_mot_de_passe/s/= .*/= \"$(dbp)\"/" config.ini || true

framework:
        mv framework.defaut.php framework.php