Calendar: remove past event
[tails/test.git] / bin / merge-APT-overlays
blob5bb8f0ec5e1ba637e4881dc7bffca559bf835877
1 #!/bin/bash
3 set -eu
4 set -x
6 error () {
7 echo "error: ${*}" >&2
8 exit 1
11 USAGE="Usage: $(basename "$0") BRANCH"
13 [ $# -eq 1 ] || error "$USAGE"
15 BRANCH="$1"
17 ### Merge the APT overlays in reprepro
19 git checkout "$BRANCH"
20 for overlay in $(ls config/APT_overlays.d/) ; do
21 if ! ssh reprepro@incoming.deb.tails.boum.org \
22 tails-merge-suite "$overlay" "$BRANCH" ; then
23 error "Failed to merge '$overlay' into '$BRANCH': $?"
25 done
27 ### Empty config/APT_overlays.d/
29 git checkout "$BRANCH"
30 find config/APT_overlays.d -type f -not -name .placeholder -exec git rm '{}' \;
31 git commit config/APT_overlays.d/ \
32 -m "Empty the list of APT overlays: they were merged"
34 ### Push the Git branch
36 git push origin "${BRANCH}:${BRANCH}"