summaryrefslogtreecommitdiff
path: root/scripts/remove_entity.sh
diff options
context:
space:
mode:
authorBjörn Mattsson <bjorn@sunet.se>2022-12-14 13:01:39 +0100
committerBjörn Mattsson <bjorn@sunet.se>2022-12-14 13:01:39 +0100
commiteb9278053b62dcf5650dd973b40e5327f0abe82c (patch)
treeab91a7bb702ee9aa5dd80271c5a32a8ad561c2e6 /scripts/remove_entity.sh
parente8bf8b7264245908549d48cef2941b910dc5f236 (diff)
Fixed support for new directorys in remove-script.
Also removed sp-with-simplesign since it's no longer in use
Diffstat (limited to 'scripts/remove_entity.sh')
-rwxr-xr-xscripts/remove_entity.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/remove_entity.sh b/scripts/remove_entity.sh
index ae55a51e..60645a7e 100755
--- a/scripts/remove_entity.sh
+++ b/scripts/remove_entity.sh
@@ -36,11 +36,11 @@ else
entityidfn=$(echo "$entityid" | sed 's;.*://;;' | sed 's/[^a-zwA-ZW0-9_.-]/-/g' | sed 's/$/.xml/')
[ -n "$entityidfn" ] || error "Failed to generate filename from entityid $entityid"
fi
-file="swamid-2.0/$entityidfn"
+file=$(find swamid-testing swamid-2.0 swamid-edugain -name "$entityidfn" | head -1)
if [ -r "$file" ]; then
echo "---------------------"
- grep "/$entityidfn" ./*.mxml sp-with-simplesign
+ grep "$file" ./*.mxml
echo "---------------------"
echo -n "OK to remove ? [Y/n]"
read -r x
@@ -50,13 +50,6 @@ if [ -r "$file" ]; then
esac
echo
- if (grep -q "$entityidfn" sp-with-simplesign); then
- sed -i.bak "/\/$entityidfn/d" sp-with-simplesign
- if [ -f sp-with-simplesign.bak ]; then
- rm sp-with-simplesign.bak
- fi
-
- fi
git rm "$file"
grep "$file" ./*.mxml | sed 's/\(.*\.mxml\): <xi:include href=".*"\/>/\1/' | while read -r mxmlfile ; do