diff options
author | 2010-05-22 18:32:53 -0500 | |
---|---|---|
committer | 2010-05-22 18:32:53 -0500 | |
commit | f6e651502fee5b65783de2d584703ebc960ee434 (patch) | |
tree | 0bee1e94690f18da63d1036e8015c05de9eb77cf | |
parent | Ensure that the htdocs/rsync dir is created (diff) | |
download | gentoo-mirrorstats-f6e651502fee5b65783de2d584703ebc960ee434.tar.gz gentoo-mirrorstats-f6e651502fee5b65783de2d584703ebc960ee434.tar.bz2 gentoo-mirrorstats-f6e651502fee5b65783de2d584703ebc960ee434.zip |
touch the state file if it is not present (fatal error)
-rwxr-xr-x | mirmon-portage.sh | 3 | ||||
-rwxr-xr-x | mirmon-source.sh | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/mirmon-portage.sh b/mirmon-portage.sh index e5e4f97..d17fd76 100755 --- a/mirmon-portage.sh +++ b/mirmon-portage.sh @@ -4,6 +4,9 @@ cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats.git/portage_mirrors # Grab mirrors from the web [[ -d ./var ]] || mkdir ./var ./get-mirror-list-portage.rb > ./var/g.mirrors +# fatal if the state file is NOT present. +[[ -e ./var/mirmon.state ]] || touch ./var/mirmon.state +# run mirmon ../../mirmon -c ./mirmon.conf -q -get update [[ -d ../../htdocs/rsync ]] || mkdir ../../htdocs/rsync # Set up a nice link to our mirror page directly: diff --git a/mirmon-source.sh b/mirmon-source.sh index 10a1675..f302f93 100755 --- a/mirmon-source.sh +++ b/mirmon-source.sh @@ -4,7 +4,10 @@ cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats.git/source_mirrors # Grab mirrors from the web [[ -d ./var ]] || mkdir ./var ./get-mirror-list-source.rb > ./var/g.mirrors -../../common/mirmon -c ./mirmon.conf -q -get update +# fatal if the state file is NOT present. +[[ -e ./var/mirmon.state ]] || touch ./var/mirmon.state +# run mirmon +../../mirmon -c ./mirmon.conf -q -get update # Set up a nice link to our mirror page directly: sed \ -e 's#mirrors</H2>#<a href="http://www.gentoo.org/main/en/mirrors2.xml">mirrors</a></H2>#' \ |