archive : fix du ref.
This commit is contained in:
parent
416ebcdfe7
commit
74a9a94e43
|
@ -29,7 +29,7 @@ function archive() {
|
||||||
local name=$(parse_camel "${target}")
|
local name=$(parse_camel "${target}")
|
||||||
|
|
||||||
# create archive.
|
# create archive.
|
||||||
tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | xz -9e > "${name}".txz
|
tar -c "${target}" | pv -s $(/usr/bin/du -sb "${target}" | awk '{print $1}') | xz -9e > "${name}".txz
|
||||||
|
|
||||||
# append hash to target name.
|
# append hash to target name.
|
||||||
mv "${name}".txz "${name}"_${date}-$(pv "${name}".txz | sha1sum | cut -d\ -f1).txz
|
mv "${name}".txz "${name}"_${date}-$(pv "${name}".txz | sha1sum | cut -d\ -f1).txz
|
||||||
|
@ -77,7 +77,7 @@ function archive_fast() {
|
||||||
local name=$(parse_camel "${target}")
|
local name=$(parse_camel "${target}")
|
||||||
|
|
||||||
# create archive.
|
# create archive.
|
||||||
tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | gzip -1 > "${name}".tgz
|
tar -c "${target}" | pv -s $(/usr/bin/du -sb "${target}" | awk '{print $1}') | gzip -1 > "${name}".tgz
|
||||||
|
|
||||||
# append hash to target name.
|
# append hash to target name.
|
||||||
mv "${name}".tgz "${name}"_${date}-$(pv "${name}".tgz | sha1sum | cut -d\ -f1).tgz
|
mv "${name}".tgz "${name}"_${date}-$(pv "${name}".tgz | sha1sum | cut -d\ -f1).tgz
|
||||||
|
|
Reference in a new issue