Skip to content
Permalink
Newer
Older
100755 36 lines (33 sloc) 957 Bytes
3
DIR=`dirname "$0"`
4
source $DIR/common.bash
5
if [[ -n "$1" ]]; then
6
MP_VERSION=$1
7
else
8
if [[ $tag == "latest" ]]; then
9
# Was: 4.0.1
10
#
11
# But we need to incorporate latest changes to I2 distribution during
12
# the development of 4.1. Therefore we use a custom build here.
13
MP_VERSION="latest-stable"
14
else
15
MP_VERSION=$tag
16
fi
19
if [[ $MP_VERSION =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
20
URL_BASE="https://download.evolveum.com/midpoint/$MP_VERSION/"
22
URL_BASE="https://download.evolveum.com/midpoint-tier/"
23
fi
24
25
echo "Downloading midPoint $MP_VERSION from $URL_BASE"
26
echo "-----------------------------------------"
27
curl --output $DIR/midpoint-dist.tar.gz "$URL_BASE/midpoint-$MP_VERSION-dist.tar.gz"
28
echo "-----------------------------------------"
29
echo "Checking the download..."
30
if tar -tf $DIR/midpoint-dist.tar.gz >/dev/null; then
32
exit 0
33
else
34
echo "The file was not downloaded correctly"
35
exit 1
You can’t perform that action at this time.