5 echo "Setting up localized browser search plugins"
7 # Link localized Tails searchplugins to the proper localization directories:
8 # e.g. files in '/usr/share/amnesia/browser/searchplugins/locale/es' will be
9 # linked in '/etc/tor-browser/profile/searchplugins/locale/es-AR',
10 # '/etc/tor-browser/profile/searchplugins/locale/es-ES', etc.
12 # Import the TBB_INSTALL and TBB_EXT variables
13 .
/usr
/local
/lib
/tails-shell-library
/tor-browser.sh
19 find "${TBB_EXT}" -maxdepth 1 -type f
-name 'langpack-*@firefox.mozilla.org.xpi' -printf "%P\n" |
20 sed -n -e "s/^langpack-\($locale\)\(-[A-Z]\+\)\?@firefox.mozilla.org.xpi/\1\2/p"
23 for LANGUAGE
in $
(find /usr
/share
/amnesia
/browser
/searchplugins
/locale
-maxdepth 1 -type d
-printf "%P\n"); do
24 LOCALES
="$(locales_for_lang "$LANGUAGE")"
25 if [ -z "$LOCALES" ]; then
26 echo "Unable to find a matching locale for $LANGUAGE." >&2
29 for LOCALE
in $LOCALES; do
30 mkdir
-p "${TBB_INSTALL}"/distribution
/searchplugins
/locale
/$LOCALE
31 for SEARCHPLUGIN
in $
(find "/usr/share/amnesia/browser/searchplugins/locale/$LANGUAGE" -maxdepth 1 -type f
); do
32 ln -s "$SEARCHPLUGIN" "${TBB_INSTALL}"/distribution
/searchplugins
/locale
/$LOCALE