-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathladder.php
executable file
·34 lines (26 loc) · 938 Bytes
/
ladder.php
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
27
28
29
30
31
32
33
34
#!/usr/bin/env php
<?php
// This hack is to get the directory that Ladder is being used in,
// based on default Composer settings.
$application_path = implode(DIRECTORY_SEPARATOR, array(
getcwd(),
'ladder',
));
// The system path we actually want to resolve the symlink.
$system_path = __DIR__ . '/system';
// Migrations directory will be created if it does not exists
$migration_path = __DIR__ . '/migrations';
if (realpath($application_path) === FALSE) {
echo 'Missing application path: ', $application_path, PHP_EOL;
exit(1);
}
if (realpath($system_path) === FALSE) {
echo 'Missing system path: ', $system_path, PHP_EOL;
exit(1);
}
$start_time = microtime(TRUE);
define('DS', DIRECTORY_SEPARATOR);
define('LADDER_APPPATH', realpath($application_path).DS);
define('LADDER_SYSPATH', realpath($system_path).DS);
define('LADDER_MIGRATIONPATH', realpath($migration_path).DS);
require_once(LADDER_SYSPATH.'core/bootstrap.php');