summaryrefslogtreecommitdiff
path: root/scripts/remove_entity.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/remove_entity.sh')
-rwxr-xr-xscripts/remove_entity.sh10
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}"`