#!/usr/bin/env php add('no-fetch', "Don't fetch events from GitHub") ->defaultValue(false); $specs->add('all', "Update all repos in mirror") ->defaultValue(false); $options = CommandLineOptions::process($args, 'Creates or updates the GitHub mirror', $specs); if (is_numeric($options)) { exit($options); } Settings::init($options); if (!$options['no-fetch']) { GitHubEvents::downloadEvents(); } $mirror = new LocalMirror(); if ($options['all']) { $mirror->refreshAll(); } else { $mirror->refresh(); } $mirror->fetchDirty(); } main($_SERVER['argv']);