From ce2271d100284691ae345d9dc87bee7de5f814e2 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 11 Mar 2024 23:43:45 +0300 Subject: [PATCH] Archive : Force pv to show progress. --- module/common/bash/module/Archive.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/common/bash/module/Archive.sh b/module/common/bash/module/Archive.sh index 837f62f..a1725eb 100644 --- a/module/common/bash/module/Archive.sh +++ b/module/common/bash/module/Archive.sh @@ -224,7 +224,8 @@ function archive_name() { } # 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() { local IFS=$'\n' local targets=(${@}) @@ -247,10 +248,10 @@ function unarchive() { # Extract. case "${file##*.}" in "txz") - ${remote[@]} pv ${file} | xz -d | tar -xf - + ${remote[@]} "pv -f" ${file} | xz -d | tar -xf - ;; "tgz") - ${remote[@]} pv ${file} | gzip -d | tar -xf - + ${remote[@]} "pv -f" ${file} | gzip -d | tar -xf - ;; esac }