checksum : return error when there are no targets.
This commit is contained in:
parent
fe160ddae4
commit
65b6887712
|
@ -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()
|
||||||
|
|
Reference in a new issue