diff options
-rwxr-xr-x | scripts/remove_entity.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/remove_entity.sh b/scripts/remove_entity.sh index 2de5d0ba..98056013 100755 --- a/scripts/remove_entity.sh +++ b/scripts/remove_entity.sh @@ -1,4 +1,11 @@ #!/bin/bash + +error() +{ + echo "Error: $*" + exit 1 +} + if [ -z "$1" ]; then echo "$0 <Filename / id from metadata to remove>" exit @@ -13,6 +20,9 @@ else [0-9][0-9]*) url="https://metadata.swamid.se/?rawXML=${metadataurl}" ;; + https://metadata.swamid.se/?showEntity=*) + url=$(echo "$metadataurl" | sed 's;showEntity;rawXML;') + ;; esac metadata=`curl -L -m 5 -s -k -f "${url}"` |