5 # Link localized Tails searchplugins to the proper localization directories:
6 # e.g. files in '/usr/share/amnesia/iceweasel/searchplugins/locale/es' will be
7 # linked in '/etc/iceweasel/searchplugins/locale/es-AR',
8 # '/etc/iceweasel/searchplugins/locale/es-ES', etc.
14 find /usr
/lib
/iceweasel
/extensions
-maxdepth 1 -type f
-name 'langpack-*@iceweasel.mozilla.org.xpi' -printf "%P\n" |
15 sed -n -e "s/^langpack-\($locale\)\(-[A-Z]\+\)\?@iceweasel.mozilla.org.xpi/\1\2/p"
18 for LANGUAGE
in $
(find /usr
/share
/amnesia
/iceweasel
/searchplugins
/locale
-maxdepth 1 -type d
-printf "%P\n"); do
19 LOCALES
="$(locales_for_lang "$LANGUAGE")"
20 if [ -z "$LOCALES" ]; then
21 echo "Unable to find a matching locale for $LANGUAGE." >&2
24 for LOCALE
in $LOCALES; do
25 mkdir
-p /etc
/iceweasel
/searchplugins
/locale
/$LOCALE
26 for SEARCHPLUGIN
in $
(find "/usr/share/amnesia/iceweasel/searchplugins/locale/$LANGUAGE" -maxdepth 1 -type f
); do
27 ln -s "$SEARCHPLUGIN" /etc
/iceweasel
/searchplugins
/locale
/$LOCALE