Deal negative value as positive
This commit is contained in:
parent
41ab85c8d1
commit
7040e36349
|
@ -425,11 +425,12 @@ main() { # {{{
|
||||||
### }}}
|
### }}}
|
||||||
### Compare current and previous sizes {{{
|
### Compare current and previous sizes {{{
|
||||||
: $(( backup_dir_compare_size=backup_dir_current_size-backup_dir_previous_size ))
|
: $(( backup_dir_compare_size=backup_dir_current_size-backup_dir_previous_size ))
|
||||||
if [ "${backup_dir_compare_size}" -lt "${min_size_int}" ] ; then
|
### Don't take care for negative value (remove minus sign)
|
||||||
debug_message "||| The differences between current and previous sizes is not enough (~${RED}${backup_dir_compare_size}${COLOR_DEBUG} ${min_size_unit})."
|
if [ "${backup_dir_compare_size#-}" -lt "${min_size_int}" ] ; then
|
||||||
|
debug_message "||| The differences between current and previous sizes is not enough (~${RED}${backup_dir_compare_size#-}${COLOR_DEBUG} ${min_size_unit})."
|
||||||
backup_dir_email="True"
|
backup_dir_email="True"
|
||||||
else
|
else
|
||||||
debug_message "||| The differences between current and previous sizes is correct (~${RED}${backup_dir_compare_size}${COLOR_DEBUG} ${min_size_unit})."
|
debug_message "||| The differences between current and previous sizes is correct (~${RED}${backup_dir_compare_size#-}${COLOR_DEBUG} ${min_size_unit})."
|
||||||
backup_dir_email="False"
|
backup_dir_email="False"
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
|
@ -457,11 +458,11 @@ main() { # {{{
|
||||||
printf '%b' "## ${backup_dir}
|
printf '%b' "## ${backup_dir}
|
||||||
Taille précédente pour cette sauvegarde/Previous size for this backup : ~${backup_dir_previous_size} ${min_size_unit} (compress).
|
Taille précédente pour cette sauvegarde/Previous size for this backup : ~${backup_dir_previous_size} ${min_size_unit} (compress).
|
||||||
Taille actuelle pour cette sauvegarde/Current size for this backup : ~${backup_dir_current_size} ${min_size_unit} (compress).
|
Taille actuelle pour cette sauvegarde/Current size for this backup : ~${backup_dir_current_size} ${min_size_unit} (compress).
|
||||||
La différence de taille (~${backup_dir_compare_size} ${min_size_unit}) est inférieure au minimum attendu (${min_size}).
|
La différence de taille (~${backup_dir_compare_size#-} ${min_size_unit}) est inférieure au minimum attendu (${min_size}).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The difference (~${backup_dir_compare_size} ${min_size_unit}) is bellow the minimum expected size (${min_size}).
|
The difference (~${backup_dir_compare_size#-} ${min_size_unit}) is bellow the minimum expected size (${min_size}).
|
||||||
" >> "${user_email_template}"
|
" >> "${user_email_template}"
|
||||||
### }}}
|
### }}}
|
||||||
### Add all recorded informations from SQLite db {{{
|
### Add all recorded informations from SQLite db {{{
|
||||||
|
|
Loading…
Reference in New Issue