Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
basecampdemos/midPoint_container/download-midpoint.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

…d, and Wordpress as provisioning target
executable file
36 lines (33 sloc)
1.06 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=`dirname "$0"` | |
source $DIR/common.bash | |
if [[ -n "$1" ]]; then | |
MP_VERSION=$1 | |
else | |
if [[ $tag == "latest" ]]; then | |
# Normally we use last released midPoint version number here, e.g. "4.1". | |
# But if we need to incorporate interim changes to I2 distribution during | |
# midPoint development cycle, we can specify concrete file from "midpoint-tier" | |
# download directory by using its name (like "latest-stable"). | |
MP_VERSION="4.1" | |
else | |
MP_VERSION=$tag | |
fi | |
fi | |
if [[ $MP_VERSION =~ ^[0-9]+(\.[0-9]+)+$ ]]; then | |
URL_BASE="https://download.evolveum.com/midpoint/$MP_VERSION/" | |
else | |
URL_BASE="https://download.evolveum.com/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 |