bash : archive & name : add success report for checks.
This commit is contained in:
parent
dbf1e70960
commit
fe09fa9139
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue