chiark / gitweb /
etc/mirrors.d/50-rfc: Fetch from rfc-editor.org.
[mirror-admin] / etc / mirrors.d / 50-rfc
CommitLineData
0039f425
MW
1#! /bin/sh -e
2###
3### Mirror RFCs and Internet Drafts from mirrorservice.org
4
5. lib/functions.sh
1742c83e
MW
6cd $MIRRORS
7
8## Fetch the RFC collection.
0039f425 9standard_rsync "$@" \
dcf95e8d
MW
10 --exclude=/tar/ \
11 ftp.rfc-editor.org::rfc-ed-all/ \
1742c83e
MW
12 rfc/
13
14## Fetch the Internet Draft collection.
1294d4a0 15standard_rsync "$@" \
dcf95e8d 16 ftp.rfc-editor.org::internet-drafts/ \
1742c83e 17 internet-drafts/
840a2c3a
MW
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
21mkdir -p rfc-bib
22if [ 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
29fi