Calendar: remove past event
[tails/test.git] / bin / announce-and-seed-torrents
blob9f05841346e800c213adfb50afe7c47c4c284d32
1 #!/bin/bash
3 set -eu
4 set -x
6 ssh bittorrent.lizard gpg --import \
7 < "${RELEASE_CHECKOUT:?}/wiki/src/tails-signing.key"
9 for type in iso img ; do
10 image_filename="tails-amd64-${VERSION:?}.${type:?}"
11 torrent_dirname="tails-amd64-${VERSION:?}-${type:?}"
12 scp \
13 "${ISOS:?}/${image_filename:?}.torrent" \
14 "${ISOS:?}/tails-amd64-${VERSION:?}/${image_filename:?}.sig" \
15 bittorrent.lizard:
17 # shellcheck disable=SC2087
18 ssh bittorrent.lizard <<-EOF
19 mkdir --mode 0775 "${torrent_dirname:?}" && \
20 cd "${torrent_dirname:?}" && \
21 mv "../${image_filename:?}.sig" . && \
22 wget --quiet \
23 "https://nightly.tails.boum.org/build_Tails_ISO_${RELEASE_BRANCH:?}/builds/${MATCHING_JENKINS_IMAGES_BUILD_ID:?}/archive/build-artifacts/${image_filename:?}" && \
24 gpg --verify ${image_filename:?}{.sig,} && \
25 cd && \
26 chgrp -R debian-transmission "${torrent_dirname:?}" && \
27 chmod -R go+rX,g+w "${torrent_dirname:?}" && \
28 mv \
29 "${torrent_dirname:?}" \
30 /var/lib/transmission-daemon/downloads/ && \
31 transmission-remote --add ${image_filename:?}.torrent \
32 --find /var/lib/transmission-daemon/downloads/ && \
33 transmission-remote --list
34 EOF
35 done