summaryrefslogtreecommitdiff
blob: 5df1c73ac9bcd70438ff212d94ca4dc11ff8035b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

INFRA="
albatross
boobie
dipper
quetzal
starling
swan
"

cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/rsync_mirrors
# Grab mirrors from the web
[[ -d ./var ]] || mkdir ./var
./get-mirror-list-rsync.rb > ./var/g.mirrors
# infra mirrors, "manually added" to list to check
for i in ${INFRA}; do
	echo "gentoo rsync://$i.gentoo.org" >> ./var/g.mirrors
done
# Test GCP mirror; added by antarus
echo "gentoo rsync://35.190.132.250" >> ./var/g.mirrors
# fatal if the state file is NOT present.
[[ -e ./var/mirmon.state ]] || touch ./var/mirmon.state
# run mirmon
/usr/bin/perl ../../mirmon/mirmon -c ./mirmon.conf -q -get update
[[ -d ../../htdocs/rsync ]] || mkdir ../../htdocs/rsync
# Set up a nice link to our mirror page directly:
sed \
    -e 's#mirrors</H2>#<a href="http://www.gentoo.org/main/en/mirrors-rsync.xml">mirrors</a></H2>#' \
    >../../htdocs/rsync/index.html <../../htdocs/rsync/index-wip.html