Archive : Fix local unarchive.

This commit is contained in:
Dmitry Voronin 2024-03-13 00:24:52 +03:00
parent 9ad7ff4701
commit 46b01f05b3

View file

@ -246,16 +246,16 @@ function unarchive() {
if [[ "${target//\\:/}" == *:* ]]; then if [[ "${target//\\:/}" == *:* ]]; then
local host="${target%%:*}" local host="${target%%:*}"
file="${target#*:}" file="${target#*:}"
remote=("sudo" "ssh" "${host}") remote=(sudo ssh ${host})
fi fi
# Extract. # Extract.
case "${file##*.}" in case "${file##*.}" in
"txz") "txz")
${remote[@]} "pv -f" ${file} | xz -d | tar -xf - ${remote[@]} pv -f ${file} | xz -d | tar -xf -
;; ;;
"tgz") "tgz")
${remote[@]} "pv -f" ${file} | gzip -d | tar -xf - ${remote[@]} pv -f ${file} | gzip -d | tar -xf -
;; ;;
esac esac
} }