d7b438844a94e20cfeb242ca313dab7c85544f2e
[mirror-admin] / etc / mirrors.d / 50-rfc
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 /ien/scanned/ \
11 --exclude /tar/ \
12 --exclude /internet-drafts/ \
13 www.ietf.org::everything-ftp/rfc/ \
14 rfc/
15
16 ## Fetch the Internet Draft collection.
17 standard_rsync "$@" \
18 rsync.mirrorservice.org::ftp.isi.edu/internet-drafts/ \
19 internet-drafts/
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
23 mkdir -p rfc-bib
24 if [ 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
31 fi