Make configure script compatbile with windows

This commit is contained in:
Michael RICOIS 2014-05-12 09:06:39 +00:00
parent d19284db97
commit 59be0f7023

View File

@ -61,35 +61,45 @@ if(isset($opts->install))
$c = new Zend_Config($application->getOptions());
//Create data directory and all his children
if ( !file_exists(APPLICATION_PATH.'/../data') ) exit(1);
if ( !file_exists(APPLICATION_PATH.'/../data') ) {
exit(1);
}
if ( !file_exists(APPLICATION_PATH.'/../data/cache') )
if ( !file_exists(APPLICATION_PATH.'/../data/cache') ) {
mkdir(APPLICATION_PATH.'/../data/cache');
}
if ( !file_exists(APPLICATION_PATH.'/../data/cache/giant') )
if ( !file_exists(APPLICATION_PATH.'/../data/cache/giant') ) {
mkdir(APPLICATION_PATH.'/../data/cache/giant');
}
if ( !file_exists(APPLICATION_PATH.'/../data/files') )
if ( !file_exists(APPLICATION_PATH.'/../data/files') ) {
mkdir(APPLICATION_PATH.'/../data/files');
}
if ( !file_exists(APPLICATION_PATH.'/../data/infogreffe') )
if ( !file_exists(APPLICATION_PATH.'/../data/infogreffe') ) {
mkdir(APPLICATION_PATH.'/../data/infogreffe');
}
if ( !file_exists(APPLICATION_PATH.'/../data/log') )
if ( !file_exists(APPLICATION_PATH.'/../data/log') ) {
mkdir(APPLICATION_PATH.'/../data/log');
}
if ( !file_exists(APPLICATION_PATH.'/../data/rss') )
if ( !file_exists(APPLICATION_PATH.'/../data/rss') ) {
mkdir(APPLICATION_PATH.'/../data/rss');
}
if ( !file_exists(APPLICATION_PATH.'/../data/sessions') )
if ( !file_exists(APPLICATION_PATH.'/../data/sessions') ) {
mkdir(APPLICATION_PATH.'/../data/sessions');
}
if ( !file_exists(APPLICATION_PATH.'/../data/wsdl') )
if ( !file_exists(APPLICATION_PATH.'/../data/wsdl') ) {
mkdir(APPLICATION_PATH.'/../data/wsdl');
}
if ( substr(strtoupper(PHP_OS),0,3) == 'WIN' ) {
echo "Windows OS : Créer les liens symboliques pour l'impression. Voir script d'install.";
echo "Windows OS : Créer les liens symboliques pour l'impression. Voir script.";
echo "\n";
} else {
@ -114,7 +124,5 @@ if(isset($opts->install))
passthru('chown -R www-data: '.APPLICATION_PATH.'/../');
}
echo "Fin de la configuration.\n";
}