function main() { BoostSiteTools\CommandLineOptions::parse(); $path = realpath(STATIC_DIR); if (!$path || !is_dir($path)) { echo "Unable to find documentation directory\n"; exit(1); } $releases = new BoostReleases(__DIR__ . '/../generated/state/release.txt'); foreach (new DirectoryIterator(STATIC_DIR) as $dir) { if ($dir->isDot()) { continue; } $name = $dir->getFilename(); if ($name == 'develop' || $name == 'master') { // Store this somewhere? } else { if (preg_match('@^boost_[0-9_]+$@', $name)) { $releases->addDocumentation(BoostVersion::from($name), "/doc/libs/{$name}"); } } } $releases->save(); }