eid-ops/md1.komreg.net/overlay/opt/mdqp/pre.d/10-fetching-metadata
2023-11-01 10:14:45 +01:00

18 lines
413 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# Verify and update the repo. Previously run by cron but to mitigate/remove
# race condion it moved here.
cd /var/cache/metadata_r1.komreg.net && make update
cd /opt/metadata
incoming_dir=/opt/mdqp/work/incoming_metadata
mkdir -p ${incoming_dir}
tmp_dir=$(mktemp -d)
rsync -a qa-idp/*.xml qa-sp/*.xml ${tmp_dir}/
rsync -a --delete ${tmp_dir}/ ${incoming_dir}/
rm -rf "${tmp_dir}"