#!/bin/bash cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/releases_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/releases ]] || mkdir ../../htdocs/releases sed \ -e 's#mirrors#mirrors#' \ >../../htdocs/releases/index.html <../../htdocs/releases/index-wip.html # Generate a json file containing the state of each mirror ../json/generate-json.py /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/releases_mirrors/var/mirmon.state \ > ../../htdocs/releases/state.json