From e7e64f683888b28172f290d5db386a879a9d002d Mon Sep 17 00:00:00 2001 From: kdusek Date: Thu, 13 Nov 2025 17:59:47 +0100 Subject: [PATCH] Disable package manager installation for Borg CLI to ensure the latest version is always installed from GitHub releases --- install-borg-cli.sh | 72 ++------------------------------------------- 1 file changed, 3 insertions(+), 69 deletions(-) diff --git a/install-borg-cli.sh b/install-borg-cli.sh index fa09131..269848e 100755 --- a/install-borg-cli.sh +++ b/install-borg-cli.sh @@ -329,75 +329,9 @@ determine_install_strategy() { # Function to install Borg CLI from package manager install_borg_from_package_manager() { - # Package manager installation only works for system-wide installation - if [[ "$INSTALL_STRATEGY" == user* ]]; then - print_status "Skipping package manager for user installation" - return 1 - fi - - print_status "Attempting to install Borg CLI from package manager..." - - case $PKG_MANAGER in - apt) - # Check if Borg CLI is available in official repositories - if apt-cache show borgbackup 2>/dev/null | grep -q "borg"; then - print_status "Installing Borg CLI from Ubuntu/Debian repositories..." - sudo apt install -y borgbackup - return 0 - else - print_warning "Borg CLI not available in Ubuntu/Debian repositories" - return 1 - fi - ;; - yum) - # Check if Borg CLI is available - if yum list available borgbackup 2>/dev/null | grep -q borgbackup; then - print_status "Installing Borg CLI from yum repositories..." - sudo yum install -y borgbackup - return 0 - else - print_warning "Borg CLI not available in yum repositories" - return 1 - fi - ;; - dnf) - # Check if Borg CLI is available - if dnf list available borgbackup 2>/dev/null | grep -q borgbackup; then - print_status "Installing Borg CLI from dnf repositories..." - sudo dnf install -y borgbackup - return 0 - else - print_warning "Borg CLI not available in dnf repositories" - return 1 - fi - ;; - pacman) - # Borg is available in Arch repositories - if pacman -Si borg 2>/dev/null | grep -q borg; then - print_status "Installing Borg CLI from pacman repositories..." - sudo pacman -S --noconfirm borg - return 0 - else - print_warning "Borg CLI not available in pacman repositories" - return 1 - fi - ;; - zypper) - # Check if Borg CLI is available - if zypper search -x borgbackup 2>/dev/null | grep -q borgbackup; then - print_status "Installing Borg CLI from zypper repositories..." - sudo zypper install -y borgbackup - return 0 - else - print_warning "Borg CLI not available in zypper repositories" - return 1 - fi - ;; - *) - print_warning "Package manager $PKG_MANAGER not supported for automatic installation" - return 1 - ;; - esac + # Package manager versions are often outdated, use binary from GitHub instead + print_warning "Package manager installation skipped for Borg CLI to ensure latest version, using binary instead" + return 1 } # Function to install Borg CLI from binary