#!/bin/sh

# script/sync-crls: update the DOD CRLs and place them where authnid expects them
set -e
cd "$(dirname "$0")/.."

mkdir -p crl-tmp crls
./.venv/bin/python ./atst/domain/authnid/crl/util.py crl-tmp crls
if [ "$(ls -A crl-tmp)" ]; then
  cp -r crl-tmp/* crls/
fi
rm -rf crl-tmp
