Skip to content
Permalink
20d5b2291c
Go to file
 
 
Cannot retrieve contributors at this time
executable file 32 lines (29 sloc) 808 Bytes
#!/bin/bash
DIR=`dirname "$0"`
source $DIR/common.bash
if [[ -n "$1" ]]; then
MP_VERSION=$1
else
if [[ $tag == "latest" ]]; then
MP_VERSION="4.0-SNAPSHOT"
else
MP_VERSION=$tag
fi
fi
if [[ $MP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
URL_BASE="https://download.evolveum.com/downloads/midpoint/$MP_VERSION/"
else
URL_BASE="https://download.evolveum.com/downloads/midpoint-tier/"
fi
echo "Downloading midPoint $MP_VERSION from $URL_BASE"
echo "-----------------------------------------"
curl --output $DIR/midpoint-dist.tar.gz "$URL_BASE/midpoint-$MP_VERSION-dist.tar.gz"
echo "-----------------------------------------"
echo "Checking the download..."
if tar -tf $DIR/midpoint-dist.tar.gz >/dev/null; then
echo "OK"
exit 0
else
echo "The file was not downloaded correctly"
exit 1
fi
You can’t perform that action at this time.