forked from iay/shibboleth-idp-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch-shib
executable file
·52 lines (39 loc) · 1.05 KB
/
fetch-shib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# Fetch the Shibboleth release to use.
#
. VERSIONS
#
# Exit when any command fails
#
set -e
# Destination directory
DEST=fetched-${SHIB_RELEASE}
DEST2=fetched
# Shibboleth release location
SHIB_RELDIR=http://shibboleth.net/downloads/identity-provider/$SHIB_RELEASE
SHIB_PREFIX=shibboleth-identity-provider-$SHIB_RELEASE
# Import Shibboleth project keys
gpg --import SHIB_KEYS
# Fetch everything into a clean download directory
rm -rf $DEST
mkdir $DEST
cd $DEST
# Fetch the IdP release
wget $SHIB_RELDIR/$SHIB_PREFIX.tar.gz
wget $SHIB_RELDIR/$SHIB_PREFIX.tar.gz.asc
wget $SHIB_RELDIR/$SHIB_PREFIX.tar.gz.sha256
# Verify SHA-256 checksum on IdP release
echo SHA-256 check for $SHIB_PREFIX.tar.gz:
sha256sum --check $SHIB_PREFIX.tar.gz.sha256
# Verify GPG signature on IdP release
gpg $SHIB_PREFIX.tar.gz.asc
# Unpack IdP and rename to standard directories
tar xf $SHIB_PREFIX.tar.gz
mv $SHIB_PREFIX shibboleth-dist
cd ..
# Copy to normal "fetched" directory
echo "Downloaded to $DEST, copying to $DEST2."
rm -rf $DEST2
cp -r $DEST $DEST2
# End.