Copy configuration every time we made an update

This commit is contained in:
Michael RICOIS 2015-06-12 09:43:41 +00:00
parent 1e5b034c81
commit 5d091a42cd

View File

@ -72,16 +72,11 @@ if ($opts->install)
$appconfigDir = APPLICATION_PATH.'/configs'; $appconfigDir = APPLICATION_PATH.'/configs';
$profil = $opts->install; $profil = $opts->install;
if ( ! file_exists($appconfigDir.'/application.ini') ) {
$result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini'); $result = copy($configDir.'/'.$profil.'/application.ini', $appconfigDir.'/application.ini');
if ($result !== true) { if ($result !== true) {
echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n"; echo date('Y-m-d H:i:s')." - Impossible de copier la configuration.\n";
exit(1); exit(1);
} }
} else {
echo date('Y-m-d H:i:s')." - Le profil de configuration existe déja.\n";
exit(1);
}
// Create application, bootstrap, and run // Create application, bootstrap, and run
$application = new Zend_Application( $application = new Zend_Application(