Archive : Fix paths.
This commit is contained in:
parent
f0a4d6ba78
commit
a0727c8901
|
@ -22,7 +22,7 @@ function archive() {
|
|||
[[ -f "${target}/.archiveignore" ]] && exclude="--exclude-from=${target}/.archiveignore"
|
||||
|
||||
# create archive.
|
||||
local hash=$(tar ${exclude} -c ${target} | pv -s $(/usr/bin/du -sb ${target} | awk '{print $1}') | xz -9e | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
||||
local hash=$(tar ${exclude} -c ${target} | pv -s $(du -sb ${target} | awk '{print $1}') | xz -9e | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
||||
|
||||
# append hash to target name.
|
||||
local new_name="${name}_${date}-${hash}.txz"
|
||||
|
@ -57,7 +57,7 @@ function archive_mt() {
|
|||
local mem_limit=$((mem_free*3/4))
|
||||
|
||||
# create archive.
|
||||
local hash=$(tar ${exclude} -c ${target} | pv -s $(/usr/bin/du -sb ${target} | awk '{print $1}') | xz -9e --threads=0 --memlimit=${mem_limit}MiB | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
||||
local hash=$(tar ${exclude} -c ${target} | pv -s $(du -sb ${target} | awk '{print $1}') | xz -9e --threads=0 --memlimit=${mem_limit}MiB | tee ${name}.txz | sha1sum | cut -d\ -f1)
|
||||
|
||||
# append hash to target name.
|
||||
local new_name="${name}_${date}-${hash}.txz"
|
||||
|
@ -89,7 +89,7 @@ function archive_fast() {
|
|||
[[ -f "${target}/.archiveignore" ]] && exclude="--exclude-from=${target}/.archiveignore"
|
||||
|
||||
# create archive.
|
||||
local hash=$(tar ${exclude} -c "${target}" | pv -s $(/usr/bin/du -sb "${target}" | awk '{print $1}') | gzip -1 | tee "${name}".tgz | sha1sum | cut -d\ -f1)
|
||||
local hash=$(tar ${exclude} -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | gzip -1 | tee "${name}".tgz | sha1sum | cut -d\ -f1)
|
||||
|
||||
# append hash to target name.
|
||||
local new_name="${name}_${date}-${hash}.tgz"
|
||||
|
|
Reference in a new issue