6 for dir
in config
/APT_snapshots.d vagrant
/definitions
/tails-builder
/config
/APT_snapshots.d
; do
8 cd "$(git rev-parse --show-toplevel)/${dir:?}"
10 SERIAL
="$(cat ${ARCHIVE:?}/serial)"
11 if [ "${SERIAL:?}" = 'latest' ]; then
13 if [ "${ARCHIVE:?}" != 'debian-security' ]; then
14 echo "Warning: origin '${ARCHIVE:?}' is using the 'latest' snapshot, which is unexpected" >&2
17 case "${ARCHIVE:?}" in
28 EXPIRY
="$(curl --silent "https
://time-based.snapshots.deb.tails.boum.org
/${ARCHIVE:?}/dists/${DIST:?}/snapshots/${SERIAL:?}/Release
" | sed -n 's/^Valid-Until:\s\+\(.*\)$/\1/p')"
30 STATUS
="archive '${ARCHIVE:?}' uses snapshot '${SERIAL:?}' which expires on: ${EXPIRY:?}"
31 if [ "${EXPIRY}" = 'never' ] || \
32 [ "$(date -d "${EXPIRY}" +%s)" -ge "$(date -d "now
+ 1 month
" +%s)" ]; then
36 echo "FAIL: ${STATUS}, which is within one month!" >&2
42 if [ "${FAILURE}" = yes ]; then