} else {
        if ($argv[0] == '-o') {
            $config['orientation'] = $argv[1];
            array_shift($argv);
        } else {
            if ($argv[0] == '-f') {
                $config['force'] = true;
            } else {
                if ($argv[0] == '-noproj') {
                    $config['noproj'] = true;
                } else {
                    if ($config['packageName'] == '') {
                        $config['packageName'] = $argv[0];
                    }
                }
            }
        }
    }
    array_shift($argv);
} while (count($argv) > 0);
$creator = new ProjectCreator($config);
if ($creator->run()) {
    echo <<<EOT

DONE.


EOT;
} else {
    help();
}
}
if ($config['help']) {
    help();
    exit(0);
}
if ($config['config']) {
    $configFilename = $config['config'];
    if (file_exists($configFilename)) {
        $config = @(include $configFilename);
    } else {
        $config = null;
    }
    if (!is_array($config)) {
        printf("ERR: invalid config file, %s\n", $configFilename);
        errorhelp();
        exit(1);
    }
}
$config['extrawork'] = $extrawork;
$creator = new ProjectCreator($config, $options);
if ($creator->validateConfig()) {
    if ($creator->run() == true) {
        exit(0);
    } else {
        exit(1);
    }
    // return($creator->run());
} else {
    errorhelp();
    exit(1);
}
    return 1;
}
$config = fetchCommandLineArguments($argv, $options, 4);
if (!$config) {
    errorhelp();
    return 1;
}
if ($config['help']) {
    help();
    return 0;
}
if ($config['config']) {
    $configFilename = $config['config'];
    if (file_exists($configFilename)) {
        $config = @(include $configFilename);
    } else {
        $config = null;
    }
    if (!is_array($config)) {
        printf("ERR: invalid config file, %s\n", $configFilename);
        errorhelp();
        return 1;
    }
}
$creator = new ProjectCreator($config, $options);
if ($creator->validateConfig()) {
    return $creator->run();
} else {
    errorhelp();
    return 1;
}