summaryrefslogtreecommitdiff
blob: f8012ccb630e2cb423a06dde7a2d7ce114d2212c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/distfiles_mirrors
# Grab mirrors from the web
[[ -d ./var ]] || mkdir ./var
./get-mirror-list-distfiles.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/distfiles ]] || mkdir ../../htdocs/distfiles
sed \
    -e 's#mirrors</H2>#<a href="http://www.gentoo.org/main/en/mirrors2.xml">mirrors</a></H2>#' \
    >../../htdocs/distfiles/index.html <../../htdocs/distfiles/index-wip.html