aboutsummaryrefslogtreecommitdiffstats
path: root/tools/update-mirrors-list.php
diff options
context:
space:
mode:
Diffstat (limited to 'tools/update-mirrors-list.php')
-rw-r--r--tools/update-mirrors-list.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/update-mirrors-list.php b/tools/update-mirrors-list.php
index d9be85226..ee17f9b2c 100644
--- a/tools/update-mirrors-list.php
+++ b/tools/update-mirrors-list.php
@@ -2,7 +2,20 @@
/**
* Run this to update lib/cached.list.php mirrors list from mirrors.mageia.org/api
*
+ * Usage for regeneration of cached.list.php for ISO and torrent files:
+ * 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';
-Downloads::get_all_mirrors(false); \ No newline at end of file
+$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);