2024-09-28 20:13:03 +01:00
#!/bin/sh -e
. ../../common-script.sh
installLibreWolf( ) {
2024-11-07 19:03:21 +00:00
if ! command_exists io.gitlab.librewolf-community && ! command_exists librewolf; then
2024-09-28 20:13:03 +01:00
printf "%b\n" " ${ YELLOW } Installing Librewolf... ${ RC } "
case " $PACKAGER " in
apt-get| nala)
" $ESCALATION_TOOL " " $PACKAGER " install -y gnupg lsb-release apt-transport-https ca-certificates
distro = ` if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $( lsb_release -sc) " ; then lsb_release -sc; else echo focal; fi `
curl -fsSL https://deb.librewolf.net/keyring.gpg | " $ESCALATION_TOOL " gpg --dearmor -o /usr/share/keyrings/librewolf.gpg
echo " Types: deb
URIs: https://deb.librewolf.net
Suites: $distro
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/librewolf.gpg" | " $ESCALATION_TOOL " tee /etc/apt/sources.list.d/librewolf.sources > /dev/null
" $ESCALATION_TOOL " " $PACKAGER " update
" $ESCALATION_TOOL " " $PACKAGER " install -y librewolf
; ;
dnf)
curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo > /dev/null
" $ESCALATION_TOOL " " $PACKAGER " install -y librewolf
; ;
zypper)
" $ESCALATION_TOOL " rpm --import https://rpm.librewolf.net/pubkey.gpg
" $ESCALATION_TOOL " zypper ar -ef https://rpm.librewolf.net librewolf
" $ESCALATION_TOOL " zypper refresh
" $ESCALATION_TOOL " zypper --non-interactive install librewolf
; ;
pacman)
" $AUR_HELPER " -S --needed --noconfirm librewolf-bin
; ;
2025-01-11 13:27:27 +00:00
xbps-install)
printf '%s\n' 'repository=https://github.com/index-0/librewolf-void/releases/latest/download/' | " $ESCALATION_TOOL " tee /etc/xbps.d/20-librewolf.conf > /dev/null
" $ESCALATION_TOOL " " $PACKAGER " -Syu librewolf
; ;
2024-11-07 19:03:21 +00:00
apk)
checkFlatpak
flatpak install flathub io.gitlab.librewolf-community
; ;
2024-09-28 20:13:03 +01:00
*)
printf "%b\n" " ${ RED } Unsupported package manager: " " $PACKAGER " " ${ RC } "
exit 1
; ;
esac
else
printf "%b\n" " ${ GREEN } LibreWolf Browser is already installed. ${ RC } "
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installLibreWolf