2016-10-28 06:47:30 +02:00
|
|
|
<?php
|
|
|
|
|
2018-04-11 09:03:09 +02:00
|
|
|
// Mock app if not installed with silverstripe/installer
|
2016-10-28 06:47:30 +02:00
|
|
|
if (defined('BASE_PATH')) {
|
2018-04-11 09:03:09 +02:00
|
|
|
$projectPath = BASE_PATH . '/app';
|
2016-10-28 06:47:30 +02:00
|
|
|
} else {
|
2018-04-11 09:03:09 +02:00
|
|
|
$projectPath = getcwd() . '/app';
|
2016-10-28 06:47:30 +02:00
|
|
|
}
|
2022-04-13 07:07:59 +02:00
|
|
|
if (!is_dir($projectPath ?? '')) {
|
|
|
|
mkdir($projectPath ?? '', 02775);
|
2017-01-11 22:05:05 +01:00
|
|
|
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
|
|
|
}
|