summaryrefslogtreecommitdiffstats
path: root/check.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-20 17:02:22 +0200
committerRemi Collet <remi@php.net>2023-07-20 17:02:22 +0200
commit41559b55aba533c189b4aea99cbc97e13a3dd28e (patch)
tree45fb6c6fe4fed7e95d94dcb2aa1d315f3b458118 /check.php
parent2dd73c093396fc7122f8d1ccfe597cee44d1a121 (diff)
allow to check selected servers
Diffstat (limited to 'check.php')
-rwxr-xr-xcheck.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/check.php b/check.php
index cc898107..a524d40c 100755
--- a/check.php
+++ b/check.php
@@ -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;
}