PartKeepr::initialize();
$ask = true;
$migration = false;
echo "PartKeepr Setup\n";
echo "Use SetupDatabase.php --help for help\n\n";
foreach ($_SERVER["argv"] as $arg) {
    switch ($arg) {
        case "--yes":
            $ask = false;
            break;
        case "--migrate":
        case "--migration":
            $migration = true;
            break;
        case "--verbose":
            Setup::setVerbose(true);
            break;
        case "--help":
            echo "Usage: SetupDatabase.php [OPTION]\n\n";
            echo "Actions performed by this script:\n";
            echo "* Creates the schema\n";
            echo "* Sets up the basic data\n";
            echo "* Imports data from database partdb (if specified)\n\n";
            echo "Please make sure to enter your database settings in the file config.php.\n";
            echo "Use the file config.php.template as template for your configuration.\n\n";
            echo "Arguments:\n";
            echo " --yes\t\t\tAssumes 'YES' for the security prompt. USE WITH CAUTION!\n";
            echo " --migrate\t\tAlso migrates the data from the old PartDB database\n";
            echo " --verbose\t\tOutputs verbose information about the setup process\n";
            echo " --help\t\t\tDisplays this help\n\n";
            die;