diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/run.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/run.php b/scripts/run.php index 0ba999a..2995f8a 100644 --- a/scripts/run.php +++ b/scripts/run.php @@ -7,10 +7,20 @@ 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', '/home/phil/sites/'); -define('CONFIG_ROOT', '/home/phil/sites/'); +define('SITES_ROOT', $config['SITES_ROOT']); +define('CONFIG_ROOT', $config['SITES_ROOT']); new App\Script\Console; |