From e31ec4507c495254239f11841d81c865e80e41a9 Mon Sep 17 00:00:00 2001 From: filip Date: Sat, 2 May 2015 16:13:53 +0200 Subject: adding download of pdf and epub file infrastructure --- tools/update-mirrors-list.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tools') 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); -- cgit v1.2.1