Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
db2517c6
Commit
db2517c6
authored
Oct 15, 2014
by
Tails developers
Browse files
Use local variables in shell functions.
parent
e9979c95
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/chroot_local-includes/usr/local/bin/tor-browser
View file @
db2517c6
...
...
@@ -33,12 +33,13 @@ tor_has_bootstrapped() {
# Workaround bug #8036 by copying any localized search plugins into
# the profile.
enable_localized_searchplugins
()
{
TBB_LOCALE
=
$(
cat
/var/lib/tails-user-session/browser-locale.js |
\
local
locale
locale
=
$(
cat
/var/lib/tails-user-session/browser-locale.js |
\
sed
's@^pref("general\.useragent\.locale", "\([^"]*\)");$@\1@'
)
if
[
"
${
TBB_LOCALE
}
"
=
en-US
]
;
then
if
[
"
${
locale
}
"
=
en-US
]
;
then
return
fi
PLUGIN_DIR
=
"
${
TBB_INSTALL
}
"
/distribution/searchplugins/locale/
${
TBB_LOCALE
}
PLUGIN_DIR
=
"
${
TBB_INSTALL
}
"
/distribution/searchplugins/locale/
${
locale
}
if
[
!
-e
"
${
PROFILE
}
"
/searchplugins
]
&&
[
-d
"
${
PLUGIN_DIR
}
"
]
;
then
mkdir
-p
"
${
PROFILE
}
"
/searchplugins
# The plugins do not load if they are symlinks
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment