diff options
author | Leif Johansson <leifj@sunet.se> | 2017-10-11 13:21:38 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2017-10-11 13:21:38 +0200 |
commit | 001fe3371b56155de261868f2dca6ef255044bcb (patch) | |
tree | 0b9097b94f791614eb0bfb392951c28fac95cfd0 /scripts | |
parent | 891619885cbd6834c26e2f7f7e9aed51be9ae502 (diff) |
follow redirects
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get-metadata.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/get-metadata.sh b/scripts/get-metadata.sh index 3e39b80e..fae50ebb 100755 --- a/scripts/get-metadata.sh +++ b/scripts/get-metadata.sh @@ -30,18 +30,18 @@ if test -d swamid-2.0 ; then fi if echo "$metadataurl" | grep -qE '^http://|^https://' ; then - metadata=`curl -s -k -f "$metadataurl"` + metadata=`curl -L -s -k -f "$metadataurl"` elif echo "$metadataurl" | grep -qE '^reep:' ; then id=`echo -n "$metadataurl" | sed 's/^reep://' | sha1sum | awk '{print $1}'` metadataurl="http://md.reep.refeds.org/entities/%7Bsha1%7D$id" - metadata=`curl -s -k -f "$metadataurl"` + metadata=`curl -L -s -k -f "$metadataurl"` else if [ -s "${metadataurl}" ]; then metadata=`cat "$metadataurl"` else urls="https://${metadataurl}/idp/shibboleth https://${metadataurl}/Shibboleth.sso/Metadata https://${metadataurl}/saml/index/sp-metadata https://${metadataurl}/saml/metadata" for i in ${urls}; do - metadata=`curl -s -k -f "${i}"` + metadata=`curl -L -s -k -f "${i}"` [ -n "${metadata}" ] && break done fi |