From 39b5c7c1384d344e554e69b6333bc91d72291c83 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:26:46 -0500 Subject: [PATCH] Pale Moon: switch to `add_external_repo` and `rm_external_repo` --- apps/Pale Moon/install-64 | 20 ++++++++++++-------- apps/Pale Moon/uninstall | 6 +++++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/Pale Moon/install-64 b/apps/Pale Moon/install-64 index b7200cec401..c62332a260b 100755 --- a/apps/Pale Moon/install-64 +++ b/apps/Pale Moon/install-64 @@ -1,10 +1,14 @@ #!/bin/bash -echo 'deb http://download.opensuse.org/repositories/home:/stevenpusser/Debian_10/ /' | sudo tee /etc/apt/sources.list.d/home:stevenpusser.list >/dev/null -curl -fsSL https://download.opensuse.org/repositories/home:stevenpusser/Debian_10/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_stevenpusser.gpg >/dev/null - -(install_packages palemoon) -if [ $? != 0 ];then - #if package-installation failed, remove repository to avoid breaking apt updates - sudo rm -f /etc/apt/sources.list.d/home:stevenpusser.list /etc/apt/trusted.gpg.d/home_stevenpusser.gpg - exit 1 + +#remove deprecated files +sudo rm -f /etc/apt/sources.list.d/home:stevenpusser.list /etc/apt/trusted.gpg.d/home_stevenpusser.gpg + +add_external_repo "stevenpusser" "http://download.opensuse.org/repositories/home:/stevenpusser/Debian_10/ /" "https://download.opensuse.org/repositories/home:stevenpusser/Debian_10/Release.key" || exit 1 + +apt_update +if [ $? != 0 ]; then + rm_external_repo "stevenpusser" + error "Failed to perform apt update after adding stevenpusser repository." fi + +install_packages palemoon || exit 1 diff --git a/apps/Pale Moon/uninstall b/apps/Pale Moon/uninstall index 6f94fc5e083..7f64d3f06c4 100755 --- a/apps/Pale Moon/uninstall +++ b/apps/Pale Moon/uninstall @@ -1,4 +1,8 @@ #!/bin/bash purge_packages || exit 1 -remove_repofile_if_unused /etc/apt/sources.list.d/home:stevenpusser.list + +#remove deprecated files +sudo rm -f /etc/apt/sources.list.d/home:stevenpusser.list /etc/apt/trusted.gpg.d/home_stevenpusser.gpg + +rm_external_repo "stevenpusser"