mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-07-19 12:01:48 +00:00
Check for available archive tools in download_install
This commit is contained in:
@@ -1474,15 +1474,31 @@ download_install() {
|
|||||||
# the download_select_install function
|
# the download_select_install function
|
||||||
case "$download_filename" in
|
case "$download_filename" in
|
||||||
*.tar.gz)
|
*.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)"
|
download_basename="$(basename "$download_filename" .tar.gz)"
|
||||||
;;
|
;;
|
||||||
*.tgz)
|
*.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)"
|
download_basename="$(basename "$download_filename" .tgz)"
|
||||||
;;
|
;;
|
||||||
*.tar.xz)
|
*.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)"
|
download_basename="$(basename "$download_filename" .tar.xz)"
|
||||||
;;
|
;;
|
||||||
*.tar.zst)
|
*.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)"
|
download_basename="$(basename "$download_filename" .tar.zst)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Reference in New Issue
Block a user