update-bugdoctxt 936 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
  4. . $SCRIPTVARS
  5. export TERM=linux
  6. destdir=$ftpdir/doc
  7. urlbase=https://www.debian.org/Bugs/
  8. cd $destdir
  9. convert () {
  10. src=$1; dst=$2
  11. rm -f .new-$dst
  12. echo Generating $dst from https://www.debian.org/Bugs/$src ...
  13. sudo -u dak-unpriv SSL_CERT_FILE=/etc/ssl/ca-debian/ca-certificates.crt lynx -nolist -dump $urlbase$src | sed -e 's/^ *$//' | perl -00 -ne 'exit if /Back to the Debian Project homepage/; print unless ($.==1 || $.==2 || $.==3 || /^\s*Other BTS pages:$/m)' >.new-$dst
  14. if cmp -s .new-$dst $dst ; then rm -f .new-$dst
  15. else mv -f .new-$dst $dst
  16. fi
  17. }
  18. convert Reporting.html bug-reporting.txt
  19. convert Access.html bug-log-access.txt
  20. convert server-request.html bug-log-mailserver.txt
  21. convert Developer.html bug-maint-info.txt
  22. convert server-control.html bug-maint-mailcontrol.txt
  23. convert server-refcard.html bug-mailserver-refcard.txt