[ubuntu] Cleanup bash scripts (#9076)

* [ubuntu] Cleanup bash scripts

* Fix ms-repos lsb_release

* Fix install-bicep url

* Fix install-nvm
This commit is contained in:
Shamil Mubarakshin
2023-12-29 12:36:27 +01:00
committed by GitHub
parent e16b5524ff
commit 1658c2e905
56 changed files with 274 additions and 246 deletions

View File

@@ -5,28 +5,27 @@
################################################################################
# Source the helpers for use with the script
source "$HELPER_SCRIPTS/install.sh"
source "$HELPER_SCRIPTS/os.sh"
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/etc-environment.sh
# Mozillateam PPA is added manually because sometimes
# lanuchad portal sends empty answer when trying to add it automatically
repo_url="http://ppa.launchpad.net/mozillateam/ppa/ubuntu"
gpg_fingerprint="0ab215679c571d1c8325275b9bdb3d89ce49ec21"
gpg_key="/etc/apt/trusted.gpg.d/mozillateam_ubuntu_ppa.gpg"
repo_path="/etc/apt/sources.list.d/mozillateam-ubuntu-ppa-focal.list"
REPO_URL="http://ppa.launchpad.net/mozillateam/ppa/ubuntu"
GPG_FINGERPRINT="0ab215679c571d1c8325275b9bdb3d89ce49ec21"
GPG_KEY="/etc/apt/trusted.gpg.d/mozillateam_ubuntu_ppa.gpg"
REPO_PATH="/etc/apt/sources.list.d/mozillateam-ubuntu-ppa-focal.list"
# Install Firefox
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x${gpg_fingerprint}" | sudo gpg --dearmor -o $gpg_key
echo "deb $repo_url $(get_os_version_label) main" > $repo_path
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x${GPG_FINGERPRINT}" | sudo gpg --dearmor -o $GPG_KEY
echo "deb $REPO_URL $(lsb_release -cs) main" > $REPO_PATH
apt-get update
apt-get install --target-release 'o=LP-PPA-mozillateam' -y firefox
rm $repo_path
rm $REPO_PATH
# Document apt source repo's
echo "mozillateam $repo_url" >> $HELPER_SCRIPTS/apt-sources.txt
echo "mozillateam $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
# add to gloabl system preferences for firefox locale en_US, because other browsers have en_US local.
# Default firefox local is en_GB