From 467dbdbf3d7212e25ee69daeaadd8adba7c7c5b8 Mon Sep 17 00:00:00 2001 From: Björn Mattsson Date: Mon, 6 Mar 2023 11:22:05 +0100 Subject: Moved files to make ths repo signed --- metadata/scripts/create_mxml.sh | 81 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 metadata/scripts/create_mxml.sh (limited to 'metadata/scripts/create_mxml.sh') diff --git a/metadata/scripts/create_mxml.sh b/metadata/scripts/create_mxml.sh new file mode 100755 index 00000000..bb7855d5 --- /dev/null +++ b/metadata/scripts/create_mxml.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# Creates MXML files to be used in signing of Metadata +if ! test -d swamid-2.0 ; then + echo "Script should be run from base directory of swamid-metadata" + exit +fi + +ls swamid-2.0/ swamid-testing/ swamid-edugain | egrep -v "/:|^$" | sort | uniq -c | awk '$1 > 1 {print $2, "exists in more than one feed"}' + +# +# eduGAIN +# +cat << EOF > swamid-edugain-idp-1.0.mxml + + +EOF +grep -l IDPSSO swamid-edugain/*.xml | LC_ALL=C sort | while read file; do + echo " " >> swamid-edugain-idp-1.0.mxml +done +echo "" >> swamid-edugain-idp-1.0.mxml + +cat << EOF > swamid-edugain-sp-1.0.mxml + + +EOF +grep -l SPSSO swamid-edugain/*.xml | grep -v "`grep -l IDPSSO swamid-edugain/*.xml`" | LC_ALL=C sort | while read file; do + echo " " >> swamid-edugain-sp-1.0.mxml +done +echo "" >> swamid-edugain-sp-1.0.mxml + +# +# Swamid-2.0 +# +cat << EOF > swamid-idp-2.0.mxml + + + + + +EOF +grep -l IDPSSO swamid-2.0/*.xml | LC_ALL=C sort | while read file; do + echo " " >> swamid-idp-2.0.mxml +done +echo "" >> swamid-idp-2.0.mxml + +cat << EOF > swamid-sp-2.0.mxml + + + + + +EOF +grep -l SPSSO swamid-2.0/*.xml | grep -v "`grep -l IDPSSO swamid-2.0/*.xml`" | LC_ALL=C sort | while read file; do + echo " " >> swamid-sp-2.0.mxml +done +echo "" >> swamid-sp-2.0.mxml + +# +# Swamid-testing +# +cat << EOF > swamid-testing-idp-1.0.mxml + + +EOF +egrep -l "AttributeAuthorityDescriptor|IDPSSODescriptor" swamid-testing/*.xml | LC_ALL=C sort | while read file; do + echo " " >> swamid-testing-idp-1.0.mxml +done +echo "" >> swamid-testing-idp-1.0.mxml + +cat << EOF > swamid-testing-sp-1.0.mxml + + +EOF +grep -l SPSSO swamid-testing/*.xml | grep -v "`egrep -l "AttributeAuthorityDescriptor|IDPSSODescriptor" swamid-testing/*.xml`" | LC_ALL=C sort | while read file; do + echo " " >> swamid-testing-sp-1.0.mxml +done +echo "" >> swamid-testing-sp-1.0.mxml -- cgit v1.2.3