Upgrade Tor Browser to 14.0a6 (refs: tails#20448)
[tails.git] / config / chroot_local-hooks / 99-custom-packages-check
blobb6c7ebe84cb09441cb34540a89c607ba77a867ed
1 #!/bin/sh
3 set -e
5 echo "Make sure we install the required custom Tails packages"
7 # The following packages must be custom Tails versions, which currently is determined by ".0tails" being a substring of the version.
8 TAILS_PACKAGES="
9 network-manager
12 package_version() {
13 dpkg-query --show --showformat='${Version}' "${1}" 2>/dev/null
16 tails_package_installed() {
17 package_version "${1}" | grep -q "\.0tails"
20 errors=
21 for p in ${TAILS_PACKAGES}; do
22 if ! tails_package_installed "${p}"; then
23 errors="${errors} ${p}"
25 done
27 if [ -n "${errors}" ]; then
28 echo "These packages were expected to be custom Tails versions," \
29 "but are not:" >&2
30 for p in ${errors}; do
31 echo " - ${p} ($(package_version "${p}"))" >&2
32 done
33 exit 1