mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-24 12:29:44 +00:00
Adding Thorium and Librewolf to the browser script (#527)
* Update browser-setup.sh * Update browser-setup.sh * Update browser-setup.sh * Update browser-setup.sh
This commit is contained in:
parent
fa5ff19078
commit
2612f05ce8
|
@ -29,6 +29,31 @@ install_chrome() {
|
|||
|
||||
}
|
||||
|
||||
install_thorium() {
|
||||
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
|
||||
case $PACKAGER in
|
||||
apt-get|nala)
|
||||
"$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list
|
||||
"$ESCALATION_TOOL" wget --no-hsts -P /etc/apt/sources.list.d/ http://dl.thorium.rocks/debian/dists/stable/thorium.list
|
||||
"$ESCALATION_TOOL" "$PACKAGER" update
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser
|
||||
;;
|
||||
zypper|dnf)
|
||||
url=$(curl -s https://api.github.com/repos/Alex313031/Thorium/releases/latest | grep -oP '(?<=browser_download_url": ")[^"]*\.rpm')
|
||||
echo $url && curl -L $url -o thorium-latest.rpm
|
||||
"$ESCALATION_TOOL" rpm -i thorium-latest.rpm && rm thorium-latest.rpm
|
||||
;;
|
||||
pacman)
|
||||
"$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager. Please install Thorium manually.${RC}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
printf "%b\n" "${GREEN}Thorium Browser installed successfully!${RC}"
|
||||
}
|
||||
|
||||
install_firefox() {
|
||||
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
|
||||
case "$PACKAGER" in
|
||||
|
@ -52,6 +77,45 @@ install_firefox() {
|
|||
|
||||
}
|
||||
|
||||
install_librewolf() {
|
||||
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
|
||||
case $PACKAGER in
|
||||
apt-get|nala)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" update && "$ESCALATION_TOOL" "$PACKAGER" install -y wget 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`
|
||||
wget -O- 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
|
||||
;;
|
||||
rpm-ostree)
|
||||
rpm-ostree 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 ref
|
||||
"$ESCALATION_TOOL" zypper in librewolf
|
||||
;;
|
||||
pacman)
|
||||
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager. Please install Librewolf manually.${RC}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
printf "%b\n" "${GREEN}Librewolf installed successfully!${RC}"
|
||||
}
|
||||
|
||||
install_brave() {
|
||||
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
|
||||
case "$PACKAGER" in
|
||||
|
@ -137,10 +201,12 @@ browserSetup() {
|
|||
printf "%b\n" "Select the browsers you want to install:"
|
||||
printf "%b\n" "1. Google Chrome"
|
||||
printf "%b\n" "2. Mozilla Firefox"
|
||||
printf "%b\n" "3. Brave"
|
||||
printf "%b\n" "4. Vivaldi"
|
||||
printf "%b\n" "5. Chromium"
|
||||
printf "%b\n" "5. Lynx"
|
||||
printf "%b\n" "3. Librewolf"
|
||||
printf "%b\n" "4. Brave"
|
||||
printf "%b\n" "5. Vivaldi"
|
||||
printf "%b\n" "6. Chromium"
|
||||
printf "%b\n" "7. Thorium"
|
||||
printf "%b\n" "8. Lynx"
|
||||
printf "%b\n" "----------------------------"
|
||||
printf "%b\n" "Enter your choices (e.g., 1 3 5): "
|
||||
read -r choice
|
||||
|
@ -148,10 +214,12 @@ browserSetup() {
|
|||
case $ch in
|
||||
1) install_chrome ;;
|
||||
2) install_firefox ;;
|
||||
3) install_brave ;;
|
||||
4) install_vivaldi ;;
|
||||
5) install_chromium ;;
|
||||
6) install_lynx;;
|
||||
3) install_librewolf ;;
|
||||
4) install_brave ;;
|
||||
5) install_vivaldi ;;
|
||||
6) install_chromium ;;
|
||||
7) install_thorium ;;
|
||||
8) install_lynx;;
|
||||
*) printf "%b\n" "${RED}Invalid option: $ch ${RC}" ;;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user