init 1.08 KB
Newer Older
semenov committed
1 2 3
#!/usr/bin/env php
<?php
/**
4
 * SkeekS Application Initialization Tool
semenov committed
5
 *
6 7 8
 * php init help
 * php init install --autoremove --unlock
 * php init remove
9 10 11 12 13 14 15
 *
 * @author Semenov Alexander <semenov@skeeks.com>
 * @link http://skeeks.com/
 * @copyright 2010-2014 SkeekS (Sx)
 * @date 19.02.2015
 * @since 1.0.0
 */
16
define("ROOT_DIR", realpath(__DIR__));
semenov committed
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
$installClassFile = __DIR__ . '/install/Install.php';
if (!file_exists($installClassFile))
{
    echo "Установочный пакет не найден, пробуем установить его с использованием git" . PHP_EOL;

    system("cd " . ROOT_DIR . "; mkdir install");
    system("cd " . ROOT_DIR . "; git clone http://git.skeeks.com/skeeks/cms-install.git install");
}

if (!file_exists($installClassFile))
{
    die("Не найден установочный скрипт, скачайте его в диррикторию install из http://git.skeeks.com/skeeks/cms-install.git");
}

include $installClassFile;
semenov committed
33

34 35 36
$config = (array) include __DIR__ . '/install/config.php';
$install = new Install($config);
$install->run();