From f499cf7b8d8e855aec6dcf18abbbebb3efaa63c0 Mon Sep 17 00:00:00 2001 From: Fredrik Domeij Date: Tue, 8 Dec 2020 08:29:43 +0100 Subject: remember good privacystatementurl forever --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c6ef2ec1..de05f78a 100644 --- a/Makefile +++ b/Makefile @@ -123,11 +123,8 @@ testRefedsRnS: testGeantCoCo: @echo "Checking for Geant CoCo compliance" + @touch sp-with-coco-errors @for x in `cat swamid-edugain-sp-1.0.mxml swamid-edugain-testing-1.0.mxml swamid-sp-2.0.mxml swamid-testing-sp-1.0.mxml | grep -v "\.mxml$$" | grep "xi:include" | awk -F\" '{print $$2}' | xargs grep -l SPSSODescriptor | sort -u` ; do \ - if grep -qx "$$x" sp-with-coco-errors ; then \ - echo " Known missing link to CoCo in PrivacyStatementURL: $$x" 1>&2 ; \ - continue ; \ - fi ; \ got_geant_CoCo=`cat $$x | sed 's;\(/dev/null | grep 'http://www.geant.net/uri/dataprotection-code-of-conduct/v1'` ; \ if [ -n "$$got_geant_CoCo" ] ; then \ ( \ @@ -151,7 +148,13 @@ testGeantCoCo: echo " Missing PrivacyStatementURL in english"'' ; \ fi ; \ echo "$$mdui_PrivacyStatementURL" | sed 's/>\n\(.*\)<.*/\1 \2/' | while read lang url ; do \ - curl -A 'Mozilla' -s -L -m 5 "$$url" < /dev/null | grep "https*://www.geant.net/uri/dataprotection-code-of-conduct/v1" > /dev/null || echo " Missing link to geant.net/code-of-conduct/v1 in PrivacyStatementURL $$lang ($$url)" ; \ + if grep -qx "$$x" sp-with-coco-errors ; then \ + echo " Known bad link to CoCo in PrivacyStatementURL: $$x" 1>&2 ; \ + else \ + if ! grep -q "$$url $$lang $$mdui_PrivacyStatementURL" sp-with-once-ok-coco-link ; then \ + curl -A 'Mozilla' -s -L -m 5 "$$url" < /dev/null | grep "https*://www.geant.net/uri/dataprotection-code-of-conduct/v1" > /dev/null && echo "$$url $$lang $$mdui_PrivacyStatementURL" >> sp-with-once-ok-coco-link || echo " Missing link to geant.net/code-of-conduct/v1 in PrivacyStatementURL $$lang ($$url)" ; \ + fi ; \ + fi ; \ done ; \ fi ; \ fi ; \ -- cgit v1.2.3