Merge branch 'stable' into devel
[tails.git] / bin / add-release-files-to-website
blob5b139942df8a82bae2bad11d22921a38712ab3c8
1 #!/bin/bash
3 set -eu
4 set -x
6 git rm \
7 "${RELEASE_CHECKOUT:?}/wiki/src/torrents/files/tails-amd64-"*.{build-manifest,iso.sig,img.sig,packages,iso.torrent,img.torrent}
9 mkdir -p "${RELEASE_CHECKOUT:?}/wiki/src/torrents/files"
11 cp "${ISO_PATH:?}.sig" \
12 "${IMG_PATH:?}.sig" \
13 "${ISOS:?}/tails-amd64-${VERSION:?}/tails-amd64-${VERSION:?}.build-manifest" \
14 "${ISOS:?}/tails-amd64-${VERSION:?}/tails-amd64-${VERSION:?}.packages" \
15 "${ISOS:?}/tails-amd64-${VERSION:?}".{iso,img}.torrent \
16 "${RELEASE_CHECKOUT:?}/wiki/src/torrents/files/"
18 # shellcheck disable=SC2012
19 LC_NUMERIC=C ls -l -h -L "${ISO_PATH:?}" | \
20 cut -f 5 -d ' ' | sed -r 's/(.+)([MG])/\1 \2B/' \
21 > "${RELEASE_CHECKOUT:?}/wiki/src/inc/stable_amd64_iso_size.html"
22 # shellcheck disable=SC2012
23 LC_NUMERIC=C ls -l -h -L "${IMG_PATH:?}" | \
24 cut -f 5 -d ' ' | sed -r 's/(.+)([MG])/\1 \2B/' \
25 > "${RELEASE_CHECKOUT:?}/wiki/src/inc/stable_amd64_img_size.html"
27 gpg --check-trustdb
28 LANG=C TZ=UTC \
29 gpg --no-options --keyid-format long \
30 --trusted-key "${TAILS_SIGNATURE_KEY_LONG_ID:?}" \
31 --verify "${IMG_PATH:?}.sig" "${IMG_PATH:?}" 2>&1 \
32 | perl -pE 's/\[ultimate\]$/[full]/' \
33 | sed 's/ /\&nbsp;/g;s/</\&lt;/;s/>/\&gt;/;s/$/<br\/>/g' \
34 > "${RELEASE_CHECKOUT:?}/wiki/src/inc/stable_amd64_img_gpg_signature_output.html"