blob: fae7df673ceecc76480f0f3be32e3a03bb281bf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/experimental_mirrors
# Grab mirrors from the web
[[ -d ./var ]] || mkdir ./var
../get-mirrors-from-distfiles-xml.rb > ./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
# Set up a nice link to our mirror page directly:
[[ -d ../../htdocs/experimental ]] || mkdir ../../htdocs/experimental
sed \
-e 's#mirrors</H2>#<a href="http://www.gentoo.org/main/en/mirrors2.xml">mirrors</a></H2>#' \
>../../htdocs/experimental/index.html <../../htdocs/experimental/index-wip.html
# Generate a json file containing the state of each mirror
../json/generate-json.py /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/experimental_mirrors/var/mirmon.state \
> ../../htdocs/experimental/state.json
|