diff --git a/modules/archive.sh b/modules/archive.sh index 62ba886..3a926a0 100755 --- a/modules/archive.sh +++ b/modules/archive.sh @@ -41,13 +41,14 @@ check_input() { exit 2 fi - echo "Archiving file/directory '${input_file}' with password '${archive_pwd}'" >&2 + echo "Archiving file/directory '${input_file}' with password '${archive_pwd}' and size '$size'" >&2 } calc_smart_volumes() { total_size=$(du -s -BM "${input_file}" | grep -oP '^\d+') || return num_volumes=$(echo "($total_size + $size - 1) / $size" | bc) size=$(echo "($total_size + $num_volumes - 1) / $num_volumes" | bc) + echo "Calculated smart volume size '$size'" >&2 } @@ -62,6 +63,7 @@ set_volumes() { generate_name() { archive="$archive_dir/$(base64 /dev/urandom | tr -dc [:alnum:] | head -c 20).7z" + echo "Generated archive name '$archive'" >&2 }