#!/usr/bin/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 (!$options['no-fetch']) { GitHubEventQueue::downloadEvents(); } $mirror = new LocalMirror(); if ($options['all']) { $mirror->refreshAll(); } else { $mirror->refresh(); } $mirror->fetchDirty(); } main($_SERVER['argv']);