} if (count($files) === 0) { echo $progName . ': Missing input files. Please run `' . $progName . ' --help` for usage information.' . "\n"; exit(1); } /* The metadata global variable will be filled with the metadata we extract. */ $metaloader = new sspmod_metarefresh_MetaLoader(); foreach ($files as $f) { $source = array('src' => $f); if (isset($validateFingerprint)) { $source['validateFingerprint'] = $validateFingerprint; } $metaloader->loadSource($source); } if ($toStdOut) { $metaloader->dumpMetadataStdOut(); } else { $metaloader->writeMetadataFiles($outputDir); } exit(0); /** * This function prints the help output. */ function printHelp() { global $progName; /* '======================================================================' */ echo 'Usage: ' . $progName . ' [options] [files]' . "\n"; echo "\n"; echo 'This program parses a SAML metadata files and output pieces that can' . "\n"; echo 'be added to the metadata files in metadata/.' . "\n";