From 2c8437971174bc0695582d8bc35b7b1da597c837 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 17 Jun 2025 09:02:02 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/misc/tools.func b/misc/tools.func index 60efce85..582d9566 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -889,7 +889,18 @@ function fetch_and_deploy_gh_release() { } mkdir -p "$target" - [[ $filename == *.zip ]] && unzip "$tmpdir/$filename" -d "$target" || [[ $filename == *.tar.gz ]] && tar -xzf "$tmpdir/$filename" -C "$target" + if [[ "$filename" == *.zip ]]; then + if ! command -v unzip &>/dev/null; then + $STD apt-get install -y unzip + fi + unzip "$tmpdir/$filename" -d "$target" + elif [[ "$filename" == *.tar.gz ]]; then + tar -xzf "$tmpdir/$filename" -C "$target" + else + msg_error "Unsupported archive format: $filename" + rm -rf "$tmpdir" + return 1 + fi elif [[ "$mode" == "singlefile" ]]; then local pattern="$6"