etc/mirrors.d/50-rfc: Build bibliographic database from the RFC index.
[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
MW
9standard_rsync "$@" \
10 --exclude /ien/scanned/ \
11 --exclude /tar/ \
1294d4a0
MW
12 --exclude /internet-drafts/ \
13 www.ietf.org::everything-ftp/rfc/ \
1742c83e
MW
14 rfc/
15
16## Fetch the Internet Draft collection.
1294d4a0
MW
17standard_rsync "$@" \
18 rsync.mirrorservice.org::ftp.isi.edu/internet-drafts/ \
1742c83e 19 internet-drafts/
840a2c3a
MW
20
21## Build a usable BibTeX database of RFCs. XSLT runes are by Roland
22## Bless, taken from http://www.tm.uka.de/~bless/bibrfcindex.html
23mkdir -p rfc-bib
24if [ rfc/rfc-index.xml -nt rfc-bib/rfc.bib ]; then
25 xsltproc $HOME/lib/rfcxmlindex2bibtex.xslt rfc/rfc-index.xml |
26 sed '
27 s/\([_&%#$]\)/\\\1/g
28 /author=/s/\([^ ]*\) \(3rd\|Jr\.\)/\{\1 \2\}/g
29 ' >rfc-bib/rfc-bib.new
30 mv rfc-bib/rfc-bib.new rfc-bib/rfc.bib
31fi