bash : archive & name : add success report for checks.

This commit is contained in:
Dmitry Voronin 2023-10-26 18:54:05 +03:00
parent dbf1e70960
commit fe09fa9139
2 changed files with 7 additions and 2 deletions

View file

@ -98,9 +98,11 @@ archive_check()
((count++)) ((count++))
done done
# report if any failed. # report result.
if [[ ${failed} -gt 0 ]]; then if [[ ${failed} -gt 0 ]]; then
echo -e "${color_bred}Items failed to validate: ${failed}.${color_default}" echo -e "${color_bred}Items failed to validate: ${failed}.${color_default}"
else
echo -e "${color_green}All successful.${color_default}"
fi fi
} }

View file

@ -117,6 +117,7 @@ name_hash_check()
files="[^.]*" files="[^.]*"
total=$(ls -p | grep -v / | wc -l) total=$(ls -p | grep -v / | wc -l)
fi fi
# process. # process.
for file in $files; do for file in $files; do
# process only files. # process only files.
@ -141,9 +142,11 @@ name_hash_check()
fi fi
done done
# report if any failed. # report result.
if [[ ${failed} -gt 0 ]]; then if [[ ${failed} -gt 0 ]]; then
echo -e "${color_bred}Items failed to validate: ${failed}.${color_default}" echo -e "${color_bred}Items failed to validate: ${failed}.${color_default}"
else
echo -e "${color_green}All successful.${color_default}"
fi fi
} }