Commit ac0ba7d2 authored by Tails developers's avatar Tails developers
Browse files

Merge remote-tracking branch...

Merge remote-tracking branch 'origin/bugfix/8037-install-localized-wikipedia-searchplugins' into testing
parents 6968f6ac 650667ca
#!/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