From c2af8fef1b1ddf40cc993321aabf3b754b8a5eed Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 4 Nov 2024 08:55:19 -0500 Subject: [PATCH] Remove legacy repos on latest Ubuntu --- README.md | 8 +++++--- installJRMC | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 30c5a9c..f8fe41b 100755 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ # installJRMC -This self-contained program will install [JRiver Media Center](https://www.jriver.com/) and associated services on most major Linux distros. +This self-contained program will install [JRiver Media Center](https://www.jriver.com/) and associated services on most Linux distributions. -You can always find the latest version of installJRMC, changelog, and documentation in [my repository](https://git.bryanroessler.com/bryan/installJRMC). +You can find the latest version of installJRMC, changelog, and documentation in [my repository](https://git.bryanroessler.com/bryan/installJRMC). ## Executing `installJRMC [--option [ARGUMENT]]` -Running `installJRMC` without any options implies `--install repo` and will install the latest version of JRiver Media Center (MC) from the official JRiver repository (Ubuntu/Debian) or my [unofficial repository](https://repos.bryanroessler.com/jriver/) (Fedora/CentOS) using the system package manager. If any other option is passed, then the default install method (i.e. `--install repo` or `--install local`) must be specified (to allow services and containers to be installed independent of MC). +Running `installJRMC` without any options implies `--install repo` (on SUSE: `--install local`) and will install the latest version of Media Center from the official JRiver repository (Ubuntu/Debian) or my [unofficial repository](https://repos.bryanroessler.com/jriver/) (Fedora/CentOS) using the system package manager. If `--service` or `--container` is passed then the default install method (`--install repo` or `--install local`) must be specified (to allow services and containers to be installed independent of MC). + +Recent versions of installJRMC will automatically self-update to the latest installJRMC release. ## tl;dr diff --git a/installJRMC b/installJRMC index e122fd9..e8b426d 100755 --- a/installJRMC +++ b/installJRMC @@ -16,7 +16,7 @@ shopt -s extglob -declare -g SCRIPT_VERSION="1.3.9" +declare -g SCRIPT_VERSION="1.3.10-dev" declare -g MC_REPO="bullseye" # should match the MC_VERSION declare -g MC_VERSION="33.0.37" # Do find all replace declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33 @@ -602,6 +602,8 @@ install_mc_repo() { if [[ $ID == "ubuntu" ]] \ && [[ $major_version -gt 24 || ($major_version -eq 24 && $minor_version -ge 10) ]]; then repo_file="/etc/apt/sources.list.d/jriver.sources" # TODO new Ubuntu sources file format + local old_repo_file="/etc/apt/sources.list.d/jriver.list" + [[ -f $old_repo_file ]] && execute rm -f "$old_repo_file" read -r -d '' repo_text <<-EOF Types: deb URIs: http://dist.jriver.com/latest/mediacenter/ @@ -625,8 +627,8 @@ install_mc_repo() { ;; esac - echo "Adding MC repository to $repo_file" - sudo tee "$repo_file" > /dev/null <<< "$repo_text" + echo "Adding MC repository file: $repo_file" + sudo tee "$repo_file" &>/dev/null <<< "$repo_text" if ! "${PKG_UPDATE[@]}"; then err "Package update failed!" @@ -1506,7 +1508,8 @@ uninstall() { echo "Removing repo files" execute sudo rm -rf \ "/etc/yum.repos.d/jriver.repo" \ - /etc/apt/sources.list.d/{jriver,mediacenter}*.list # also remove legacy repo files + /etc/apt/sources.list.d/{jriver,mediacenter}*.{list,sources} # also remove legacy repo files + if [[ $ID == "suse" ]]; then execute sudo zypper --non-interactive removerepo jriver fi