Added smart volume size explanation

This commit is contained in:
PedoDeveloper 2024-11-11 12:40:59 +00:00
parent 926df11f34
commit c29fa867f3

View file

@ -44,6 +44,7 @@ check_input() {
echo "Archiving file/directory '${input_file}' with password '${archive_pwd}' and size '$size'" >&2
}
# Calculates a "smart" volume size so that each volume (including the final part) will be approximately the same size
calc_smart_volumes() {
total_size=$(du -s -BM "${input_file}" | grep -oP '^\d+') || return
num_volumes=$(echo "($total_size + $size - 1) / $size" | bc)