From 629738175e981e3185d58bed812946c3c65cba04 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 25 Sep 2015 08:41:30 +0000 Subject: [PATCH] =?UTF-8?q?Toujours=20ecras=C3=A9=20la=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build/configure.php | 40 ++++++++++++++----------------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/scripts/build/configure.php b/scripts/build/configure.php index 694ddda47..5b96eed60 100644 --- a/scripts/build/configure.php +++ b/scripts/build/configure.php @@ -61,22 +61,23 @@ if(isset($opts->install)) { echo date('Y-m-d H:i:s')." - Démarrage de la configuration.\n"; - //Copy configuration + // --- Copy configuration $configDir = realpath(dirname(__FILE__)).'/profil'; $appconfigDir = APPLICATION_PATH.'/configs'; $profil = $opts->install; - $result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini'); - if ($result !== true) { - echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n"; - exit(1); + if ($profil == 'local') { + echo date('Y-m-d H:i:s')." - Local dev, copie scripts/build/profil/local/application.ini to application/configs/.\n"; + } else { + $result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini'); + if ($result !== true) { + echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n"; + exit(1); + } } - // Create application, bootstrap, and run - $application = new Zend_Application( - APPLICATION_ENV, - APPLICATION_PATH . '/configs/application.ini' - ); + // --- Create application, bootstrap, and run + $application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini'); $c = new Zend_Config($application->getOptions()); //Create data directory and all his children @@ -89,7 +90,6 @@ if(isset($opts->install)) APPLICATION_PATH.'/../data/log', APPLICATION_PATH.'/../data/rss', APPLICATION_PATH.'/../data/sessions', - APPLICATION_PATH.'/../data/wsdl', APPLICATION_PATH.'/../data/sessions', APPLICATION_PATH.'/../data/wsdl', ); @@ -107,20 +107,10 @@ if(isset($opts->install)) } else { //Création des liens symboliques pour l'impression - if ( ! file_exists($c->profil->path->pages.'/themes/default/images') ) - passthru('ln -vs '.APPLICATION_PATH.'/../public/themes/default/images '. - $c->profil->path->pages.'/themes/default/images'); - - if ( ! file_exists($c->profil->path->pages.'/themes/default/scripts') ) - passthru('ln -vs '.APPLICATION_PATH.'/../public/themes/default/scripts '. - $c->profil->path->pages.'/themes/default/scripts'); - - if ( ! file_exists($c->profil->path->pages.'/fichier/imgcache') ) - passthru('ln -vs '.APPLICATION_PATH.'/../data/pages/imgcache'.' '. - $c->profil->path->pages.'/fichier/imgcache'); - - if ( ! file_exists($c->profil->path->pages.'/fichier/logo') ) - passthru('ln -vs '.$c->profil->path->data.'/logos '.$c->profil->path->pages.'/fichier/logo'); + passthru('ln -vsf '.APPLICATION_PATH.'/../public/themes/default/images '.$c->profil->path->pages.'/themes/default/images'); + passthru('ln -vsf '.APPLICATION_PATH.'/../public/themes/default/scripts '.$c->profil->path->pages.'/themes/default/scripts'); + passthru('ln -vsf '.APPLICATION_PATH.'/../data/pages/imgcache'.' '.$c->profil->path->pages.'/fichier/imgcache'); + passthru('ln -vsf '.$c->profil->path->data.'/logos '.$c->profil->path->pages.'/fichier/logo'); //Modification des permissions passthru('chown -R www-data: '.APPLICATION_PATH.'/../');