Commit 650667ca authored by Tails developers's avatar Tails developers
Browse files

Install localized wikipedia search plugins (again).

Previously we got them from the iceweasel-l10n-* packages, but we do
not install them since the TBB migration.
parent dd812cc7
#!/bin/sh
set -e
echo "Install extra browser search plugins"
# Import the TBB_EXT variable
. /usr/local/lib/tails-shell-library/tor-browser.sh
LOCALIZED_PLUGINS_DIR=/usr/share/amnesia/browser/searchplugins/locale
for langpack in "${TBB_EXT}"/langpack-*@firefox.mozilla.org.xpi; do
locale="$(basename "${langpack}" | sed 's,^langpack-\([^@]\+\)@.*$,\1,')"
pkg=iceweasel-l10n-"$(echo ${locale} | tr 'A-Z' 'a-z')"
tmp="$(mktemp -d)"
cd "${tmp}"
apt-get download "${pkg}"
ar x "${pkg}"*.deb
path_to_searchplugins=etc/iceweasel/searchplugins/locale/"${locale}"
tar xf data.tar.* --wildcards ./"${path_to_searchplugins}"/wikipedia-'*'.xml
mkdir -p "${LOCALIZED_PLUGINS_DIR}"/"${locale}"
cp "${path_to_searchplugins}"/* "${LOCALIZED_PLUGINS_DIR}"/"${locale}"
cd /
rm -r "${tmp}"
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment