aboutsummaryrefslogtreecommitdiffstats
path: root/tools/update-mirrors-list.php
blob: 0ee8601a208cba0482b3df567e608e6548b14c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
 * Run this to update lib/cached.list.php and cached.list_doc.php mirrors list from mirrors.mageia.org/api
 *
 * Usage from the git clone root location:
 * php ./tools/update-mirrors-list.php
 *
*/

require __DIR__ . '/../lib/Downloads.php';

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);