diff options
author | Remi Collet <remi@remirepo.net> | 2023-07-20 17:02:22 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-07-20 17:02:22 +0200 |
commit | 41559b55aba533c189b4aea99cbc97e13a3dd28e (patch) | |
tree | 45fb6c6fe4fed7e95d94dcb2aa1d315f3b458118 | |
parent | 2dd73c093396fc7122f8d1ccfe597cee44d1a121 (diff) |
allow to check selected servers
-rwxr-xr-x | check.php | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -193,9 +193,19 @@ if (!$cli) { $pids = array(); $ref = getRepoTime($full); if ($ref) { - printf(($cli ? "Check %d mirrors of %s (%s)\n" : "<h3>%s - %s</h3>\n"), count($mirrors), $name, date('r', $ref)); if (!$cli) echo "<ul class='pkglist'>\n"; - foreach ($mirrors as $mirror) { + if (isset($_SERVER['argv'][1])) { + $tocheck = []; + foreach ($mirrors as $mirror) { + if (preg_match('|'.$_SERVER['argv'][1].'|', $mirror)) { + $tocheck[] = $mirror; + } + } + } else { + $tocheck = $mirrors; + } + printf(($cli ? "Check %d mirror(s) of %s (%s)\n" : "<h3>%s - %s</h3>\n"), count($tocheck), $name, date('r', $ref)); + foreach ($tocheck as $mirror) { if ($_SERVER['argc']>1 && !strpos($mirror, $_SERVER['argv'][1])) { continue; } |