#!/bin/sh
# This should be called from cron as user eprints.
# It loops through each archive on the system and calls the various
# generate_xxx maintenance scripts on it.

# generate_views
find /opt/eprints3/archives -mindepth 1 -maxdepth 1 -type d -printf "%f\n" \
    | xargs --max-args=1 --no-run-if-empty /opt/eprints3/bin/generate_views --quiet

# generate_abstracts
find /opt/eprints3/archives -mindepth 1 -maxdepth 1 -type d -printf "%f\n" \
    | xargs --max-args=1 --no-run-if-empty /opt/eprints3/bin/generate_abstracts --quiet
