summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pull-and-verify.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/pull-and-verify.sh b/scripts/pull-and-verify.sh
index 92485214..c375f503 100755
--- a/scripts/pull-and-verify.sh
+++ b/scripts/pull-and-verify.sh
@@ -9,6 +9,12 @@ URL=$1
DIR=$2
CERT=$3
+if echo "$DIR" | grep -q "mds.swamid.se" ; then
+ publish_name=mds.swamid.se
+else
+ publish_name=md.swamid.se
+fi
+
TMPF=`mktemp`
wget -q --timeout 120 --no-check-certificate -O$TMPF $URL || die "Unable to download $URL: $?"
if [ "x$CERT" != "x" ]; then
@@ -19,7 +25,7 @@ xsltproc --stringparam output $TMPD xslt/import-metadata.xsl $TMPF || die "Unabl
rsync -avz $TMPD/ $DIR
(
echo '<?xml version="1.0"?>'
-echo "<EntitiesDescriptor xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\" xmlns:xi=\"http://www.w3.org/2001/XInclude\" Name=\"http://md.swamid.se/md/$DIR.xml\">"
+echo "<EntitiesDescriptor xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\" xmlns:xi=\"http://www.w3.org/2001/XInclude\" Name=\"http://$publish_name/md/$DIR.xml\">"
T=`mktemp`
for md in $DIR/*.xml; do
xsltproc xslt/clean-entitydescriptor.xsl $md > $T && mv $T $md