|
@@ -15,9 +15,15 @@ readarray -t iaMissing < <(comm -23 <(printf "%s\n" "${localFilesSorted[@]}") <( |
|
|
|
|
|
|
|
|
status=0 |
|
|
status=0 |
|
|
|
|
|
|
|
|
|
|
|
RED=$'\x1b[1;31m' |
|
|
|
|
|
GREEN=$'\x1b[0;32m' |
|
|
|
|
|
RESET=$'\x1b[0m' |
|
|
|
|
|
|
|
|
if [[ ${#localMissing[@]} -eq 0 && ${#iaMissing[@]} -eq 0 ]] |
|
|
if [[ ${#localMissing[@]} -eq 0 && ${#iaMissing[@]} -eq 0 ]] |
|
|
then |
|
|
then |
|
|
echo "File list comparison: OK" |
|
|
|
|
|
|
|
|
echo "File list comparison: ${GREEN}OK${RESET}" |
|
|
|
|
|
else |
|
|
|
|
|
echo "File list comparison: ${RED}FAIL${RESET}" |
|
|
fi |
|
|
fi |
|
|
if [[ ${#iaMissing[@]} -gt 0 ]] |
|
|
if [[ ${#iaMissing[@]} -gt 0 ]] |
|
|
then |
|
|
then |
|
@@ -32,12 +38,24 @@ then |
|
|
status=1 |
|
|
status=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo |
|
|
|
|
|
|
|
|
echo "SHA-1 comparison:" |
|
|
echo "SHA-1 comparison:" |
|
|
sha1sum -c < <(printf "%s\n" "${iasha1sums[@]}") > >(sed 's,^, ,') 2>&1 |
|
|
sha1sum -c < <(printf "%s\n" "${iasha1sums[@]}") > >(sed 's,^, ,') 2>&1 |
|
|
if [[ $? -ne 0 ]] |
|
|
|
|
|
|
|
|
if [[ $? -eq 0 ]] |
|
|
then |
|
|
then |
|
|
echo "SHA-1 comparison failed!" |
|
|
|
|
|
|
|
|
echo "SHA-1 comparison: ${GREEN}OK${RESET}" |
|
|
|
|
|
else |
|
|
|
|
|
echo "SHA-1 comparison: ${RED}FAIL${RESET}" |
|
|
status=1 |
|
|
status=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo |
|
|
|
|
|
|
|
|
|
|
|
if [[ ${status} -eq 0 ]] |
|
|
|
|
|
then |
|
|
|
|
|
echo "${GREEN}OK${RESET}" |
|
|
|
|
|
else |
|
|
|
|
|
echo "${RED}FAIL${RESET}" |
|
|
|
|
|
fi |
|
|
exit ${status} |
|
|
exit ${status} |