#!/bin/bash dir=`dirname "$0"` echo "Downloading midPoint 3.9-SNAPSHOT" echo "-----------------------------------------" curl --output $dir/midpoint-3.9-SNAPSHOT-dist.tar.gz "https://evolveum.com/downloads/midpoint-tier/midpoint-3.9-SNAPSHOT-dist.tar.gz" echo "-----------------------------------------" echo "Checking the download..." if tar -tf $dir/midpoint-3.9-SNAPSHOT-dist.tar.gz >/dev/null; then echo "OK" exit 0 else echo "The file was not downloaded correctly" exit 1 fi