| 1 | #! /bin/sh -e |
| 2 | ### |
| 3 | ### Mirror RFCs and Internet Drafts from mirrorservice.org |
| 4 | |
| 5 | . lib/functions.sh |
| 6 | cd $MIRRORS |
| 7 | |
| 8 | ## Fetch the RFC collection. |
| 9 | standard_rsync "$@" \ |
| 10 | --exclude=/tar/ \ |
| 11 | ftp.rfc-editor.org::rfc-ed-all/ \ |
| 12 | rfc/ |
| 13 | |
| 14 | ## Fetch the Internet Draft collection. |
| 15 | standard_rsync "$@" \ |
| 16 | ftp.rfc-editor.org::internet-drafts/ \ |
| 17 | internet-drafts/ |
| 18 | |
| 19 | ## Build a usable BibTeX database of RFCs. XSLT runes are by Roland |
| 20 | ## Bless, taken from http://www.tm.uka.de/~bless/bibrfcindex.html |
| 21 | mkdir -p rfc-bib |
| 22 | if [ rfc/rfc-index.xml -nt rfc-bib/rfc.bib ]; then |
| 23 | xsltproc $HOME/lib/rfcxmlindex2bibtex.xslt rfc/rfc-index.xml | |
| 24 | sed ' |
| 25 | s/\([_&%#$]\)/\\\1/g |
| 26 | /author=/s/\([^ ]*\) \(3rd\|Jr\.\)/\{\1 \2\}/g |
| 27 | ' >rfc-bib/rfc-bib.new |
| 28 | mv rfc-bib/rfc-bib.new rfc-bib/rfc.bib |
| 29 | fi |