Files
boost-tasks/update-super-project
Daniel James 29dedb001e Extract the common command line code into a class.
Should possible use it for everything, especially if I add more
functionality.
2015-10-10 12:31:53 +01:00

23 lines
524 B
PHP
Executable File

#!/usr/bin/php
<?php
require_once(__DIR__.'/vendor/autoload.php');
use GetOptionKit\OptionCollection;
function main($args) {
$specs = new OptionCollection;
$specs->add('no-fetch', "Don't fetch events from GitHub")
->defaultValue(false);
$options = CommandLineOptions::process($args,
'Update the submodules in the super project',
$specs);
if (!$options['no-fetch']) {
GitHubEventQueue::downloadEvents();
}
SuperProject::updateBranches();
}
main($_SERVER['argv']);