Skip to content

Commit 3aa3daa

Browse files
[Ubuntu] Add Mozilla PPA manually (#8561)
1 parent 2051564 commit 3aa3daa

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

images/linux/scripts/installers/firefox.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,29 @@
55
################################################################################
66

77
# Source the helpers for use with the script
8-
source $HELPER_SCRIPTS/install.sh
8+
# shellcheck source=../helpers/install.sh
9+
source "$HELPER_SCRIPTS/install.sh"
10+
# shellcheck source=../helpers/os.sh
11+
source "$HELPER_SCRIPTS/os.sh"
912

10-
FIREFOX_REPO="ppa:mozillateam/ppa"
13+
# Mozillateam PPA is added manually because sometimes
14+
# lanuchad portal sends empty answer when trying to add it automatically
15+
16+
repo_url="http://ppa.launchpad.net/mozillateam/ppa/ubuntu"
17+
gpg_fingerprint="0ab215679c571d1c8325275b9bdb3d89ce49ec21"
18+
gpg_key="/etc/apt/trusted.gpg.d/mozillateam_ubuntu_ppa.gpg"
19+
repo_path="/etc/apt/sources.list.d/mozillateam-ubuntu-ppa-focal.list"
1120

1221
# Install Firefox
13-
add-apt-repository $FIREFOX_REPO -y
22+
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x${gpg_fingerprint}" | sudo gpg --dearmor -o $gpg_key
23+
echo "deb $repo_url $(getOSVersionLabel) main" > $repo_path
24+
1425
apt-get update
1526
apt-get install --target-release 'o=LP-PPA-mozillateam' -y firefox
16-
17-
# Remove source repo's
18-
add-apt-repository --remove $FIREFOX_REPO
27+
rm $repo_path
1928

2029
# Document apt source repo's
21-
echo "mozillateam $FIREFOX_REPO" >> $HELPER_SCRIPTS/apt-sources.txt
30+
echo "mozillateam $repo_url" >> $HELPER_SCRIPTS/apt-sources.txt
2231

2332
# add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local.
2433
# Default firefox local is en_GB

0 commit comments

Comments
 (0)