Newwebshop/bin/console

29 lines
675 B
PHP

#!/usr/bin/env php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Webshop\Core\Installer\Installer;
$argv = $_SERVER['argv'] ?? [];
$argc = $_SERVER['argc'] ?? 0;
if ($argc < 2) {
echo "Verwendung: php bin/console <befehl>\n";
echo "Verfügbare Befehle:\n";
echo " setup:install Installiert das Webshop-System\n";
echo " setup:update Aktualisiert das Webshop-System\n";
exit(1);
}
switch ($argv[1]) {
case 'setup:install':
Installer::postInstall();
break;
case 'setup:update':
Installer::postUpdate();
break;
default:
echo "Unbekannter Befehl: {$argv[1]}\n";
exit(1);
}