Skip to content
Permalink
Newer
Older
100755 32 lines (29 sloc) 784 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
MP_VERSION="4.0.1"
10
else
11
MP_VERSION=$tag
12
fi
15
if [[ $MP_VERSION =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
16
URL_BASE="https://download.evolveum.com/midpoint/$MP_VERSION/"
18
URL_BASE="https://download.evolveum.com/midpoint-tier/"
19
fi
20
21
echo "Downloading midPoint $MP_VERSION from $URL_BASE"
22
echo "-----------------------------------------"
23
curl --output $DIR/midpoint-dist.tar.gz "$URL_BASE/midpoint-$MP_VERSION-dist.tar.gz"
24
echo "-----------------------------------------"
25
echo "Checking the download..."
26
if tar -tf $DIR/midpoint-dist.tar.gz >/dev/null; then
28
exit 0
29
else
30
echo "The file was not downloaded correctly"
31
exit 1
You can’t perform that action at this time.