2016-10-28 06:47:30 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Mock mysite if not installed with silverstripe/installer
|
|
|
|
if (defined('BASE_PATH')) {
|
2017-01-11 22:05:05 +01:00
|
|
|
$projectPath = BASE_PATH . '/mysite';
|
2016-10-28 06:47:30 +02:00
|
|
|
} else {
|
2017-01-11 22:05:05 +01:00
|
|
|
$projectPath = getcwd() . '/mysite';
|
2016-10-28 06:47:30 +02:00
|
|
|
}
|
|
|
|
if (!is_dir($projectPath)) {
|
2017-01-11 22:05:05 +01:00
|
|
|
mkdir($projectPath, 02775);
|
|
|
|
mkdir($projectPath . '/code', 02775);
|
|
|
|
mkdir($projectPath . '/_config', 02775);
|
|
|
|
copy(__DIR__ . '/fixtures/Page.php.fixture', $projectPath . '/code/Page.php');
|
|
|
|
copy(__DIR__ . '/fixtures/PageController.php.fixture', $projectPath . '/code/PageController.php');
|
2016-10-28 06:47:30 +02:00
|
|
|
}
|