Added smart volume size explanation
This commit is contained in:
parent
926df11f34
commit
c29fa867f3
1 changed files with 1 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ check_input() {
|
||||||
echo "Archiving file/directory '${input_file}' with password '${archive_pwd}' and size '$size'" >&2
|
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() {
|
calc_smart_volumes() {
|
||||||
total_size=$(du -s -BM "${input_file}" | grep -oP '^\d+') || return
|
total_size=$(du -s -BM "${input_file}" | grep -oP '^\d+') || return
|
||||||
num_volumes=$(echo "($total_size + $size - 1) / $size" | bc)
|
num_volumes=$(echo "($total_size + $size - 1) / $size" | bc)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue