Merge branch 'stable' into devel
[tails.git] / bin / reset-custom-APT-suite
blob58470cbbbe6616b0214ad25c5683d4f0e0215d5d
1 #!/bin/bash
3 set -eu
4 set -x
6 error () {
7 echo "error: ${*}" >&2
8 exit 1
11 USAGE="Usage: $(basename "$0") SUITE_TO_RESET DESIRED_NEW_STATE"
13 [ $# -eq 2 ] || error "$USAGE"
15 SUITE_TO_RESET="$1"
16 DESIRED_NEW_STATE="$2"
18 ### Empty $SUITE_TO_RESET
19 ssh reprepro@incoming.deb.tails.boum.org \
20 reprepro removematched "$SUITE_TO_RESET" '\*'
22 ### Merge $DESIRED_NEW_STATE into $SUITE_TO_RESET
23 # shellcheck disable=SC2029
24 ssh reprepro@incoming.deb.tails.boum.org \
25 tails-merge-suite "$DESIRED_NEW_STATE" "$SUITE_TO_RESET"