From 52c206991f295b06f37c8bba5970caa3429b56a6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 2 Jun 2025 15:38:43 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index b5fed817..8adab520 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -808,11 +808,16 @@ fetch_and_deploy_gh_release() { } $STD msg_info "Installing $filename via apt" - apt-get install -y "$tmpdir/$filename" || { - msg_error "Failed to install $filename" - rm -rf "$tmpdir" - return 1 + chmod 644 "$tmpdir/$filename" + $STD apt-get install -y "$tmpdir/$filename" || { + $STD msg_info "Falling back to dpkg -i" + dpkg -i "$tmpdir/$filename" || { + msg_error "Both apt and dpkg install failed" + rm -rf "$tmpdir" + return 1 + } } + else msg_error "Unknown mode: $mode" rm -rf "$tmpdir"