summaryrefslogtreecommitdiff
path: root/scripts/run.php
blob: 2995f8a51e6b5e7f4e2b6072240dbaf45fdff5c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(E_ALL);

// Pull in bootstrap
require(realpath(dirname(__FILE__) . "/../bootstrap.php"));


// Load a config
try {
    $loader = new App\Config\Loader();
    $config = $loader->getConfig();
} catch (Exception $e) {
    echo $e->getMessage() . "\n";
    exit;
}

// Set up siteroot
// TODO Don't rely on trailing slashes here
define('DIPPER_ROOT', realpath(dirname(__FILE__) . "/../") . '/');
define('SITES_ROOT', $config['SITES_ROOT']);
define('CONFIG_ROOT', $config['SITES_ROOT']);

new App\Script\Console;