Skip to content

Commit

Permalink
fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Sep 23, 2024
1 parent 9f226a2 commit 7943330
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 162 deletions.
71 changes: 37 additions & 34 deletions core/tabs/applications-setup/browsers/brave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,44 @@

. ../../common-script.sh

if ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"| "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install brave-browser
;;
pacman)
"$AUR_HELPER" -S --noconfirm brave-bin
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}"
fi
installBrave() {
if ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install brave-browser
;;
pacman)
"$AUR_HELPER" -S --noconfirm brave-bin
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
checkAURHelper
installBrave
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

. ../../common-script.sh

installChromium() {
if ! command_exists chromium; then
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
case "$PACKAGER" in
Expand All @@ -15,6 +16,8 @@ if ! command_exists chromium; then
else
printf "%b\n" "${GREEN}Chromium Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installChromium
49 changes: 26 additions & 23 deletions core/tabs/applications-setup/browsers/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,32 @@

. ../../common-script.sh

if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install MozillaFirefox
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm firefox
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Firefox Browser is already installed.${RC}"
fi
installFirefox() {
if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install MozillaFirefox
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm firefox
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Firefox Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installFirefox
58 changes: 31 additions & 27 deletions core/tabs/applications-setup/browsers/google-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,38 @@

. ../../common-script.sh

if ! command_exists google-chrome; then
printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install google-chrome-stable
;;
pacman)
"$AUR_HELPER" -S --noconfirm google-chrome
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y fedora-workstation-repositories
"$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled google-chrome
"$ESCALATION_TOOL" "$PACKAGER" install -y google-chrome-stable
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
else
printf "%b\n" "${GREEN}Google Chrome Browser is already installed.${RC}"
fi
installChrome() {
if ! command_exists google-chrome; then
printf "%b\n" "${YELLOW}Installing Google Chrome...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install google-chrome-stable
;;
pacman)
"$AUR_HELPER" -S --noconfirm google-chrome
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y fedora-workstation-repositories
"$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled google-chrome
"$ESCALATION_TOOL" "$PACKAGER" install -y google-chrome-stable
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Google Chrome Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
checkAURHelper
installChrome
67 changes: 35 additions & 32 deletions core/tabs/applications-setup/browsers/librewolf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,47 @@

. ../../common-script.sh

if ! command_exists librewolf; then
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
installLibreWolf() {
if ! command_exists librewolf; then
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
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}LibreWolf Browser is already installed.${RC}"
fi
"$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
;;
*)
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
29 changes: 16 additions & 13 deletions core/tabs/applications-setup/browsers/lynx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

. ../../common-script.sh

if ! command_exists lynx; then
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
;;
esac
else
printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}"
fi
installLynx() {
if ! command_exists lynx; then
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
;;
esac
else
printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installLynx
51 changes: 27 additions & 24 deletions core/tabs/applications-setup/browsers/thorium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,34 @@

. ../../common-script.sh

if ! command_exists thorium-browser; then
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" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/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" "$PACKAGER" install -y thorium-latest.rpm && rm thorium-latest.rpm
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
else
printf "%b\n" "${GREEN}Thorium Browser is already installed.${RC}"
fi
installThrorium() {
if ! command_exists thorium-browser; then
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" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/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" "$PACKAGER" install -y thorium-latest.rpm && rm thorium-latest.rpm
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
else
printf "%b\n" "${GREEN}Thorium Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
checkAURHelper
installThrorium
Loading

0 comments on commit 7943330

Please sign in to comment.