From 2837f9291a4f70cc8b292bf2d7a440dd2292514c Mon Sep 17 00:00:00 2001 From: leventbesli Date: Thu, 31 Oct 2024 22:19:22 +0300 Subject: [PATCH] fix(browsers): vivaldi setup (#718) * Fixed Vivaldi Setup Lynx install script replaced with Vivaldi. * zypper and pacman added to vivaldi.sh - zypper and pacman added. - format fixes. * Delete Cargo.lock * Revert "Delete Cargo.lock" This reverts commit 0b0f173c9e6e786dedd53b56f47caf744edf893b. * xdg-utils removed from script * revert cargo.lock * update cargo.lock * update cargo.lock * Update Cargo.lock Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> * Update Cargo.lock Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> --------- Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> --- .../applications-setup/browsers/vivaldi.sh | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh index 002ff7e3..311816d0 100644 --- a/core/tabs/applications-setup/browsers/vivaldi.sh +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -2,22 +2,39 @@ . ../../common-script.sh -installLynx() { - if ! command_exists lynx; then - printf "%b\n" "${YELLOW}Installing Lynx...${RC}" +installVivaldi() { + if ! command_exists vivaldi; then + printf "%b\n" "${YELLOW}Installing Vivaldi...${RC}" case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y curl + "$ESCALATION_TOOL" curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg + "$ESCALATION_TOOL" echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" | sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://repo.vivaldi.com/stable/vivaldi-fedora.repo + "$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable + ;; + zypper) + "$ESCALATION_TOOL" zypper ar https://repo.vivaldi.com/archive/vivaldi-suse.repo + "$ESCALATION_TOOL" zypper --non-interactive --gpg-auto-import-keys in vivaldi-stable + ;; pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lynx + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm vivaldi ;; *) - "$ESCALATION_TOOL" "$PACKAGER" install -y lynx + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 ;; esac else - printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}" + printf "%b\n" "${GREEN}Vivaldi Browser is already installed.${RC}" fi } checkEnv checkEscalationTool -installLynx \ No newline at end of file +installVivaldi