#!/bin/bash DIR=`dirname "$0"` if [[ -n "$1" ]]; then MP_VERSION=$1 else MP_VERSION=3.9-SNAPSHOT fi echo "Downloading midPoint $MP_VERSION" echo "-----------------------------------------" curl --output $dir/midpoint-dist.tar.gz "https://evolveum.com/downloads/midpoint-tier/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