aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/update-mirrors-list.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/tools/update-mirrors-list.php b/tools/update-mirrors-list.php
index ee17f9b2c..0ee8601a2 100644
--- a/tools/update-mirrors-list.php
+++ b/tools/update-mirrors-list.php
@@ -1,21 +1,17 @@
<?php
/**
- * Run this to update lib/cached.list.php mirrors list from mirrors.mageia.org/api
+ * Run this to update lib/cached.list.php and cached.list_doc.php mirrors list from mirrors.mageia.org/api
*
- * Usage for regeneration of cached.list.php for ISO and torrent files:
+ * Usage from the git clone root location:
* php ./tools/update-mirrors-list.php
*
- * Usage for regeneration of cached.list_doc.php for documentation files:
- * php ./tools/update-mirrors-list.php true
- *
*/
require __DIR__ . '/../lib/Downloads.php';
-$documentation = isset($argv[1]) ? $argv[1] : false;
-if($documentation) {
- echo 'Rebuilding' . __DIR__ . '/cached.list_doc.php with date.txt as a test file.' . PHP_EOL;
-} else {
- echo 'Rebuilding' . __DIR__ . '/cached.list.php with one torrent as a test file.' . PHP_EOL;
-}
-Downloads::get_all_mirrors(false, $documentation);
+echo 'Rebuilding ./lib/cached.list.php with one torrent file as a test file.' . PHP_EOL;
+Downloads::get_all_mirrors(false);
+echo PHP_EOL . PHP_EOL;
+
+echo 'Rebuilding ./lib/cached.list_doc.php with the date.txt as a test file.' . PHP_EOL;
+Downloads::get_all_mirrors(false, true);