Skip to content

Commit cb1325c

Browse files
committed
Restore accidentally removed files
1 parent 0d1faaf commit cb1325c

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

bin/get.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/lib/_autoload.php');
5+
6+
if ($argc < 2) {
7+
fwrite(STDERR, "Missing aggregator id.\n");
8+
exit(1);
9+
}
10+
$id = $argv[1];
11+
12+
error_reporting(E_ALL ^ E_NOTICE);
13+
try {
14+
$aggregator = \SimpleSAML\Module\aggregator2\Aggregator::getAggregator($id);
15+
$xml = $aggregator->getMetadata();
16+
$xml = \SimpleSAML\Utils\XML::formatXMLString($xml);
17+
echo $xml;
18+
} catch (\Exception $e) {
19+
fwrite(STDERR, $e->getMessage()."\n");
20+
}

bin/update.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/lib/_autoload.php');
5+
6+
$name = basename($argv[0]);
7+
8+
if ($argc < 2) {
9+
fprintf(STDERR, "$name: Missing id of aggregator.\n");
10+
exit(1);
11+
}
12+
13+
$id = $argv[1];
14+
15+
$aggregator = \SimpleSAML\Module\aggregator2\Aggregator::getAggregator($id);
16+
$aggregator->updateCache();

0 commit comments

Comments
 (0)