summaryrefslogtreecommitdiff
path: root/scripts/update-and-validate.sh
diff options
context:
space:
mode:
authorBjörn Mattsson <bjorn@sunet.se>2021-03-11 17:34:57 +0100
committerBjörn Mattsson <bjorn@sunet.se>2021-03-11 17:34:57 +0100
commit29d45d0b0b3bf81c7693d50bd77f3388f8de7f3c (patch)
tree235440ed01b40d6e9839e3511b5e38768584edb8 /scripts/update-and-validate.sh
parent22ec03f78674419a898c670600751d2915f25bc6 (diff)
Updated Makefile.validate to add entityID to .validate-file, updated update-and-validate.sh to remove old entitys
Diffstat (limited to 'scripts/update-and-validate.sh')
-rwxr-xr-xscripts/update-and-validate.sh32
1 files changed, 13 insertions, 19 deletions
diff --git a/scripts/update-and-validate.sh b/scripts/update-and-validate.sh
index 800ccc8f..280064f9 100755
--- a/scripts/update-and-validate.sh
+++ b/scripts/update-and-validate.sh
@@ -8,25 +8,19 @@ update()
/var/www/scripts/updateWebb.bash
- make -f Makefile.validate
-
-# echo
-
- #echo "make aggregate"
- #make aggregate || return $?
- #echo
-
- #echo "make (2007) web site for backwards compat"
- #env SWAMID_MK_CONFIG=swamid2007.mk make web || return $?
- #echo
-
- #echo "make (2016)"
- #env SWAMID_MK_CONFIG=swamid2016.mk make || return $?
- #echo
-
- #echo "make (2016 - test)"
- #env SWAMID_MK_CONFIG=swamid2016-test.mk make # Allow this to fail
- #echo
+ make -f Makefile.validate -s
+
+ ls swamid-2.0/*.xml | sed 's@swamid-2.0/\(.*\).xml@.time/\1.validate@' > /tmp/$$.xml
+ ls .time/*.validate > /tmp/$$.time
+ comm -13 /tmp/$$.xml /tmp/$$.time | while read file; do
+ docker exec release-check /var/www/scripts/removeEntity.bash /opt/swamid-metadata/$file
+ done
+ rm /tmp/$$.xml /tmp/$$.time
+
+ # remove some to get DB refreshed
+ if [ $(find .time/ -ctime +15 | wc -l) -ne 0 ]; then
+ rm `find .time/ -ctime +15 | tail -10`
+ fi
}
cd /opt/swamid-metadata || exit 1