keep the date

This commit is contained in:
q
2019-08-20 21:25:31 +03:00
parent 5c2c1c39a1
commit 1edb40fa07

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
VERSION="20190113" VERSION="20190820"
function helpexit() { function helpexit() {
BS=$( basename "$0" ) BS=$( basename "$0" )
@@ -102,6 +102,12 @@ for d in "${REALFOLDERS[@]}"; do
eval "tar cvv --index-file=\"$d.${SUFFIX}.lst\" \"$d\" | \ eval "tar cvv --index-file=\"$d.${SUFFIX}.lst\" \"$d\" | \
pv -s \"$SIZE\" $COMPRESSCMD > \"$d.${SUFFIX}\"" && { pv -s \"$SIZE\" $COMPRESSCMD > \"$d.${SUFFIX}\"" && {
# tar exists okay # tar exists okay
NEWEST="$( awk '{ print $4 " " $5 }' "$d.${SUFFIX}.lst" | sort | tail -n 1 )"
touch \
-d "$NEWEST" \
"$d.${SUFFIX}" \
"$d.${SUFFIX}.lst"
if [ "$KEEP_LIST" -eq 0 ]; then if [ "$KEEP_LIST" -eq 0 ]; then
rm -f "$d.${SUFFIX}.lst" rm -f "$d.${SUFFIX}.lst"
fi fi