A script for installing Brave

So, the latest version of the Brave web browser in the Software Boutique is quite outdated (it still uses the Muon engine while the latest release is based on Chromium). The Linux installation instructions on brave.com require lots of terminal commands that not all might understand, so I basically turned those commands into a script with commentary and slightly more information printed in the terminal. It's very simple, but it does include commands run as root, so make sure you review it and are okay with it.

echo "Installing curl if not already installed installed"
[ -x /usr/bin/curl ] || sudo apt install -f curl
echo "\n Downloading key\n"
# Downloads the key and signature for the repository
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
source /etc/os-release
echo "\n Adding repository\n"
# Adds the Brave repository so you can then install the browser
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/brave-browser-release-${UBUNTU_CODENAME}.list
echo "\n Updating package lists\n"
# Updates your package lists so that the repository you just added shows up
sudo apt update
echo "\n Installing Brave Browser\n"
# Actually downloads and installs the Brave browser
sudo apt install brave-keyring brave-browser
1 Like