From 85c13f47b1402a64de385489405375dd7c4c9130 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Fri, 18 Jul 2025 14:17:35 -0400 Subject: [PATCH] Check for available archive tools in download_install --- lug-helper.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lug-helper.sh b/lug-helper.sh index caeb422..7034b89 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -1474,15 +1474,31 @@ download_install() { # the download_select_install function case "$download_filename" in *.tar.gz) + if [ ! -x "$(command -v gzip)" ]; then + message error "gzip does not appear to be installed. Unable to extract the requested archive." + return 1 + fi download_basename="$(basename "$download_filename" .tar.gz)" ;; *.tgz) + if [ ! -x "$(command -v gzip)" ]; then + message error "gzip does not appear to be installed. Unable to extract the requested archive." + return 1 + fi download_basename="$(basename "$download_filename" .tgz)" ;; *.tar.xz) + if [ ! -x "$(command -v xz)" ]; then + message error "xz does not appear to be installed. Unable to extract the requested archive." + return 1 + fi download_basename="$(basename "$download_filename" .tar.xz)" ;; *.tar.zst) + if [ ! -x "$(command -v zstd)" ]; then + message error "zstd does not appear to be installed. Unable to extract the requested archive." + return 1 + fi download_basename="$(basename "$download_filename" .tar.zst)" ;; *)