summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Wassberg <jocar@sunet.se>2024-12-09 10:30:48 -0500
committerJohan Wassberg <jocar@sunet.se>2024-12-09 10:30:48 -0500
commit13f123b2fc43b310405dcc46c58a1cca011028bc (patch)
treebc42a8c21d1c04ed76e36095ee4f2495adae5d69
parente03147ac3163b9eddd0abe07126d2ba7fa0061d1 (diff)
Script to build the defaults for ADFSToolkitmd-2024-12-09-v03
-rwxr-xr-xmetadata/scripts/build-adfstoolkit-federation-defaults.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/metadata/scripts/build-adfstoolkit-federation-defaults.sh b/metadata/scripts/build-adfstoolkit-federation-defaults.sh
new file mode 100755
index 00000000..1db6f057
--- /dev/null
+++ b/metadata/scripts/build-adfstoolkit-federation-defaults.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/bash
+
+set -e
+
+TMP=$(mktemp -d)
+PUBDIR=/var/www/html/entity-configurations/ADFSToolkit
+
+# More versions to come - hopefully
+# shellcheck disable=SC2043
+for version in "v2.3.0"; do
+ VERSION_DIR="${PUBDIR}/${version}"
+ VERSION_FILE="${VERSION_DIR}/SWAMID_FederationDefaults.zip"
+ if [ ! -f "${VERSION_FILE}" ]; then
+ if [ ! -d "${TMP}"/repo ]; then
+ git clone https://github.com/fedtools/federation-settings.git "${TMP}/repo"
+ fi
+ cd "${TMP}"/repo
+ git checkout "${version}"
+ cd ADFSToolkit/config/federation/
+ zip SWAMID_FederationDefaults.zip -r SWAMID
+ mkdir -p "${VERSION_DIR}"
+ mv SWAMID_FederationDefaults.zip "${PUBDIR}"/${version}/
+ fi
+
+done
+
+rm -rf "${TMP}"