Archive : Fix local unarchive.
This commit is contained in:
parent
9ad7ff4701
commit
46b01f05b3
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue