Fix permission denied when removing existing borg binary during system installation

- Add sudo prefix to rm command when installing system-wide
- Clean up outdated README files
This commit is contained in:
kdusek
2025-12-02 23:05:24 +01:00
parent c727d8e1f2
commit 97f224746c
8 changed files with 24 additions and 1260 deletions

View File

@@ -657,14 +657,21 @@ main() {
exit 1
fi
# Get latest version if not specified
if [[ -z "$target_version" ]]; then
get_latest_release
target_version="$LATEST_VERSION"
else
print_status "Using specified version: $target_version"
fi
# Create temporary directory
mkdir -p "$TEMP_DIR"
# Trap cleanup on exit
trap cleanup EXIT
# Installation logic based on method
case $install_method in
auto)
# Try package manager first
if install_from_package_manager; then
verify_installation
exit 0
fi
# Fall back to distribution-specific methods
case $OS in
ubuntu|debian|linuxmint)
@@ -687,6 +694,10 @@ main() {
tarball)
install_from_tarball "$ARCH" "$target_version"
;;
*)
print_error "Unknown install method: $install_method"
exit 1
;;
esac
# Verify installation