etc/post-mirror.d/worldofspectrum: Maintain an unzipped tree in parallel.
[mirror-admin] / etc / mirrors.d / 50-rfc
index 3323f2a..29dcca4 100755 (executable)
@@ -3,8 +3,27 @@
 ### Mirror RFCs and Internet Drafts from mirrorservice.org
 
 . lib/functions.sh
+cd $MIRRORS
+
+## Fetch the RFC collection.
+standard_rsync "$@" \
+  --exclude=/tar/ \
+  ftp.rfc-editor.org::rfc-ed-all/ \
+  rfc/
+
+## Fetch the Internet Draft collection.
 standard_rsync "$@" \
-  --exclude /ien/scanned/ \
-  --exclude /tar/ \
-  rsync.mirrorservice.org::ftp.isi.edu/in-notes/ \
-  ../pub/mirrors/rfc/
+  ftp.rfc-editor.org::internet-drafts/ \
+  internet-drafts/
+
+## Build a usable BibTeX database of RFCs.  XSLT runes are by Roland
+## Bless, taken from http://www.tm.uka.de/~bless/bibrfcindex.html
+mkdir -p rfc-bib
+if [ rfc/rfc-index.xml -nt rfc-bib/rfc.bib ]; then
+  xsltproc $HOME/lib/rfcxmlindex2bibtex.xslt rfc/rfc-index.xml |
+  sed '
+    s/\([_&%#$]\)/\\\1/g
+    /author=/s/\([^ ]*\) \(3rd\|Jr\.\)/\{\1 \2\}/g
+  ' >rfc-bib/rfc-bib.new
+  mv rfc-bib/rfc-bib.new rfc-bib/rfc.bib
+fi