|
5 | 5 | ################################################################################ |
6 | 6 |
|
7 | 7 | # 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" |
9 | 12 |
|
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" |
11 | 20 |
|
12 | 21 | # 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 | + |
14 | 25 | apt-get update |
15 | 26 | 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 |
19 | 28 |
|
20 | 29 | # 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 |
22 | 31 |
|
23 | 32 | # add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local. |
24 | 33 | # Default firefox local is en_GB |
|
0 commit comments