I now have a bash script,
utilities/generate_oai_records.sh, which does the following:
- Runs the XSLT transformation to generate the OAI records for all existing documents. This XSLT now also creates a fresh version of identify.xml which contains the right
<earliestDatestamp>for the records.
- Commits the new identify.xml to svn, and uploads it to eXist.
- Compares the newly-generated files with the old ones, and:
- Where a new file has been added, adds it to svn and uploads it to eXist.
- Where an old file exists but no new one has been created, deletes it from svn and from eXist.
- Where an old file exists, uploads it to eXist, and commits its changes to svn.
With this, we have a fully-automated process to regenerate the complete OAI record set whenever we need to. It takes about fifteen minutes to complete, and has been pretty thoroughly tested.