Calendar: add FT sprint
[tails/test.git] / bin / bump-APT-snapshots-expiration-date
blob6e00d8fdc2814df36986426ea2079923305a4a08
1 #!/bin/bash
3 set -eu
4 set -x
6 error () {
7 echo "error: ${*}" >&2
8 exit 1
11 USAGE="Usage: $(basename "$0") DAYS_FROM_NOW"
13 [ $# -eq 1 ] || error "$USAGE"
15 DAYS_FROM_NOW="$1"
17 for dir in config/APT_snapshots.d vagrant/definitions/tails-builder/config/APT_snapshots.d; do
19 set -eu
20 set -x
21 cd "${dir}"
22 for ARCHIVE in * ; do
23 if ! grep -qs '^latest$' "$ARCHIVE"/serial; then
24 ssh reprepro-time-based-snapshots@incoming.deb.tails.boum.org \
25 tails-bump-apt-snapshot-valid-until \
26 "$ARCHIVE" "$(cat "$ARCHIVE"/serial)" \
27 "${DAYS_FROM_NOW:?}"
29 done
31 done