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
664d6810
Commit
664d6810
authored
Oct 15, 2014
by
Tails developers
Browse files
Simplify the chroot browser's code slightly.
parent
046485db
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/chroot_local-includes/usr/local/sbin/i2p-browser
View file @
664d6810
...
...
@@ -111,18 +111,13 @@ setup_chroot () {
set_chroot_browser_name
()
{
NAME
=
"
${
1
}
"
LONG
=
$(
echo
${
LANG
}
|
grep
-o
"^[a-zA-Z_]*"
)
SHORT
=
${
LONG
%%_*
}
EXT_DIR
=
"
${
CHROOT
}
/
${
TBB_EXT
}
"
LOCALE
=
"
${
2
}
"
EXT_DIR
=
${
CHROOT
}
/
"
${
TBB_EXT
}
"
BRANDING
=
branding/brand.dtd
if
[
-e
"
${
EXT_DIR
}
/langpack-
${
LONG
}
@firefox.mozilla.org.xpi"
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
LO
NG
}
@firefox.mozilla.org.xpi"
if
[
"
${
LOCALE
}
"
!=
en-US
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
LO
CALE
}
@firefox.mozilla.org.xpi"
TOP
=
browser/chrome
REST
=
${
LONG
}
/locale
elif
[
-e
"
${
EXT_DIR
}
/langpack-
${
SHORT
}
@firefox.mozilla.org.xpi"
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
SHORT
}
@firefox.mozilla.org.xpi"
TOP
=
browser/chrome
REST
=
${
SHORT
}
/locale
REST
=
${
LOCALE
}
/locale
else
PACK
=
"
${
CHROOT
}
/
${
TBB_INSTALL
}
/browser/omni.ja"
TOP
=
chrome
...
...
@@ -186,7 +181,7 @@ configure_chroot () {
${
BROWSER_PREFS
}
# Set the name (e.g. window title) of the browser
set_chroot_browser_name
"
`
gettext
\"
I2P Browser
\"
`
"
set_chroot_browser_name
"
`
gettext
\"
I2P Browser
\"
`
"
"
${
BEST_LOCALE
}
"
# Set start page to the router console
echo
'user_pref("browser.startup.homepage", "'
${
START_PAGE
}
'");'
>>
\
...
...
config/chroot_local-includes/usr/local/sbin/unsafe-browser
View file @
664d6810
...
...
@@ -111,18 +111,13 @@ setup_chroot () {
set_chroot_browser_name
()
{
NAME
=
"
${
1
}
"
LONG
=
$(
echo
${
LANG
}
|
grep
-o
"^[a-zA-Z_]*"
)
SHORT
=
${
LONG
%%_*
}
LOCALE
=
"
${
2
}
"
EXT_DIR
=
${
CHROOT
}
/
"
${
TBB_EXT
}
"
BRANDING
=
branding/brand.dtd
if
[
-e
"
${
EXT_DIR
}
/langpack-
${
LONG
}
@firefox.mozilla.org.xpi"
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
LO
NG
}
@firefox.mozilla.org.xpi"
if
[
"
${
LOCALE
}
"
!=
en-US
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
LO
CALE
}
@firefox.mozilla.org.xpi"
TOP
=
browser/chrome
REST
=
${
LONG
}
/locale
elif
[
-e
"
${
EXT_DIR
}
/langpack-
${
SHORT
}
@firefox.mozilla.org.xpi"
]
;
then
PACK
=
"
${
EXT_DIR
}
/langpack-
${
SHORT
}
@firefox.mozilla.org.xpi"
TOP
=
browser/chrome
REST
=
${
SHORT
}
/locale
REST
=
${
LOCALE
}
/locale
else
PACK
=
"
${
CHROOT
}
/
${
TBB_INSTALL
}
/browser/omni.ja"
TOP
=
chrome
...
...
@@ -182,7 +177,7 @@ configure_chroot () {
echo
'user_pref("extensions.getAddons.showPane", false);'
>>
"
${
CLEARNET_PREFS
}
"
# Set the name (e.g. window title) of the browser
set_chroot_browser_name
"
`
gettext
\"
Unsafe Browser
\"
`
"
set_chroot_browser_name
"
`
gettext
\"
Unsafe Browser
\"
`
"
"
${
BEST_LOCALE
}
"
# Set start page to something that explains what's going on
echo
'user_pref("browser.startup.homepage", "'
${
START_PAGE
}
'");'
>>
\
...
...
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