#!/usr/bin/env php
<?php
/*
 *                    ....
 *                  .:   '':.
 *                  ::::     ':..
 *                  ::.         ''..
 *       .:'.. ..':.:::'    . :.   '':.
 *      :.   ''     ''     '. ::::.. ..:
 *      ::::.        ..':.. .''':::::  .
 *      :::::::..    '..::::  :. ::::  :
 *      ::'':::::::.    ':::.'':.::::  :
 *      :..   ''::::::....':     ''::  :
 *      :::::.    ':::::   :     .. '' .
 *   .''::::::::... ':::.''   ..''  :.''''.
 *   :..:::'':::::  :::::...:''        :..:
 *   ::::::. '::::  ::::::::  ..::        .
 *   ::::::::.::::  ::::::::  :'':.::   .''
 *   ::: '::::::::.' '':::::  :.' '':  :
 *   :::   :::::::::..' ::::  ::...'   .
 *   :::  .::::::::::   ::::  ::::  .:'
 *    '::'  '':::::::   ::::  : ::  :
 *              '::::   ::::  :''  .:
 *               ::::   ::::    ..''
 *               :::: ..:::: .:''
 *                 ''''  '''''
 *
 *
 * AUTOMAD
 *
 * Copyright (c) 2018-2020 by Marc Anton Dahmen
 * http://marcdahmen.de
 *
 * Licensed under the MIT license.
 * http://automad.org/license
 */

use Automad\Autoload;
use Automad\Core\Config;
use Automad\UI\Console;

if (http_response_code() || !defined('STDIN')) {
	exit('CLI only!');
}

define('AUTOMAD', true);
define('AUTOMAD_CONSOLE', true);
define('AM_BASE_DIR', dirname(dirname(__FILE__)));

require_once AM_BASE_DIR . '/automad/src/Autoload.php';

Autoload::init();
Config::overrides();
Config::defaults();

$console = new Console($argv);
