Archive : Force pv to show progress.
This commit is contained in:
parent
d11f20cc13
commit
ce2271d100
|
@ -224,7 +224,8 @@ function archive_name() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extract previously created archive with checksum validation.
|
# Extract previously created archive with checksum validation.
|
||||||
# Usage: unarchive [FILES]
|
# Supports unarchiving exact paths from the remote machines (rsync syntax).
|
||||||
|
# Usage: unarchive [HOST:FILES]
|
||||||
function unarchive() {
|
function unarchive() {
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
local targets=(${@})
|
local targets=(${@})
|
||||||
|
@ -247,10 +248,10 @@ function unarchive() {
|
||||||
# Extract.
|
# Extract.
|
||||||
case "${file##*.}" in
|
case "${file##*.}" in
|
||||||
"txz")
|
"txz")
|
||||||
${remote[@]} pv ${file} | xz -d | tar -xf -
|
${remote[@]} "pv -f" ${file} | xz -d | tar -xf -
|
||||||
;;
|
;;
|
||||||
"tgz")
|
"tgz")
|
||||||
${remote[@]} pv ${file} | gzip -d | tar -xf -
|
${remote[@]} "pv -f" ${file} | gzip -d | tar -xf -
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue