checksum : return error when there are no targets.

This commit is contained in:
Dmitry Voronin 2023-11-28 02:55:05 +03:00
parent fe160ddae4
commit 65b6887712

View file

@ -40,8 +40,10 @@ checksum_create()
if [[ ${failed} != 0 ]]; then if [[ ${failed} != 0 ]]; then
echo -e "${color_bred}Failed: ${failed}.${color_default}" echo -e "${color_bred}Failed: ${failed}.${color_default}"
false return 1
fi fi
[[ ${total} = 0 ]] && return 1
} }
# Check stored values against actual files. # Check stored values against actual files.
@ -86,13 +88,15 @@ checksum_check()
if [[ ${skipped} != 0 ]]; then if [[ ${skipped} != 0 ]]; then
echo -e "${color_byellow}Skipped: ${skipped}.${color_default}" echo -e "${color_byellow}Skipped: ${skipped}.${color_default}"
false return 1
fi fi
if [[ ${failed} != 0 ]]; then if [[ ${failed} != 0 ]]; then
echo -e "${color_bred}Failed: ${failed}.${color_default}" echo -e "${color_bred}Failed: ${failed}.${color_default}"
false return 1
fi fi
[[ ${total} = 0 ]] && return 1
} }
checksum() checksum()