summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-hooks/11-check-thunderbird-addons
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-hooks/11-check-thunderbird-addons')
-rwxr-xr-xconfig/chroot_local-hooks/11-check-thunderbird-addons20
1 files changed, 20 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/11-check-thunderbird-addons b/config/chroot_local-hooks/11-check-thunderbird-addons
new file mode 100755
index 0000000..e4612de
--- /dev/null
+++ b/config/chroot_local-hooks/11-check-thunderbird-addons
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+set -u
+
+echo "Checking for Thunderbird language packages"
+
+SUFFIX="@thunderbird.mozilla.org.xpi"
+LANG_PACK_COUNT=$(find /usr/share/thunderbird/extensions/ -name "langpack-*${SUFFIX}" | wc -l)
+
+if [ "$LANG_PACK_COUNT" = "0" ]; then
+ cat >&2 <<EOF
+E: No language packages matching the ${SUFFIX} suffix.
+ It is likely that tails-shell-library/thunderbird.sh needs an update
+EOF
+ exit 1
+else
+ echo "I: ${LANG_PACK_COUNT} language packages found" >&2
+fi
+