From b528b5e777bd56a4fcf9a1cfa635577a0ba765bd Mon Sep 17 00:00:00 2001 From: Andrew Woods Date: Tue, 11 Jul 2017 13:57:09 -0400 Subject: [PATCH] Ensure premis:hasMessageDigestAlgorithm not mistaken for result --- fixity_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixity_tests.sh b/fixity_tests.sh index 2f744a8..c59ea34 100755 --- a/fixity_tests.sh +++ b/fixity_tests.sh @@ -19,7 +19,7 @@ resultCheck 201 $HTTP_RES echo "Get a fixity result" HTTP_RES=$(curl $CUSTOM_CURL_OPTS -XGET -u${AUTH_USER}:${AUTH_PASS} ${FEDORA_URL}${PARENT}/image/fcr:fixity) resultCheckInHeaders 200 "$HTTP_RES" -TEMP=( $(echo "$HTTP_RES" | grep 'premis:hasMessageDigest' | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//') ) +TEMP=( $(echo "$HTTP_RES" | grep -v 'premis:hasMessageDigestAlgorithm' | grep 'premis:hasMessageDigest' | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//') ) FIXITY=${TEMP[1]}