Point submodule to the version with torbrowser-launcher!9 merged
[tails.git] / bin / merge-APT-overlays
blobf408ee2818ec3d96fde5a16eac100e4f43f7d9ee
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 config/APT_overlays.d/* ; do
21 # handle the case when there is no overlay
22 [[ -e "$overlay" ]] || break
23 # shellcheck disable=SC2029
24 if ! ssh reprepro@incoming.deb.tails.boum.org \
25 tails-merge-suite "$(basename "${overlay}")" "$BRANCH" ; then
26 error "Failed to merge '$overlay' into '$BRANCH': $?"
28 done
30 ### Empty config/APT_overlays.d/
32 git checkout "$BRANCH"
33 find config/APT_overlays.d -type f -not -name .placeholder -exec git rm '{}' \;
34 git commit config/APT_overlays.d/ \
35 -m "Empty the list of APT overlays: they were merged" || :
37 ### Push the Git branch
39 git push origin "${BRANCH}:${BRANCH}"