update-mirrorlists 827 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. #
  3. # Very Very hackish script... dont laugh.
  4. # Michael Beattie <mjb@debian.org>
  5. set -e
  6. export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
  7. . $SCRIPTVARS
  8. prog=$scriptdir/mirrorlist/mirror_list.pl
  9. masterlist=$scriptdir/mirrorlist/Mirrors.masterlist
  10. test ! -f $HOME/.cvspass && touch $HOME/.cvspass
  11. grep -q "anonscm.debian.org:/cvs/webwml" ~/.cvspass || \
  12. echo ":pserver:anonymous@anonscm.debian.org:/cvs/webwml A" >> $HOME/.cvspass
  13. cd $(dirname $masterlist)
  14. cvs update
  15. if [ ! -f $ftpdir/README.mirrors.html -o $masterlist -nt $ftpdir/README.mirrors.html ] ; then
  16. rm -f $ftpdir/README.mirrors.html $ftpdir/README.mirrors.txt
  17. $prog -m $masterlist -t html > $ftpdir/README.mirrors.html
  18. $prog -m $masterlist -t text > $ftpdir/README.mirrors.txt
  19. echo Updated archive version of mirrors file
  20. fi