Skip to content
Permalink
Newer
Older
100755 38 lines (35 sloc) 1 KB
Sep 27, 2018
1
#!/bin/bash
2
3
function normalize_path()
4
{
5
# Remove all /./ sequences.
6
local path=${1//\/.\//\/}
7
8
# Remove dir/.. sequences.
9
while [[ $path =~ ([^/][^/]*/\.\./) ]]
10
do
11
path=${path/${BASH_REMATCH[0]}/}
12
done
13
echo $path
14
}
15
16
cd "$(dirname "$0")"
Sep 28, 2018
17
SKIP_DOWNLOAD=0
18
while getopts "nh?" opt; do
19
case $opt in
20
n) SKIP_DOWNLOAD=1 ;;
21
h | ?) echo "Options: -n skip download" ; exit 0 ;;
22
*) echo "Unknown option: $opt" ; exit 1 ;;
23
esac
24
done
25
if [ "$SKIP_DOWNLOAD" = "0" ]; then ./download-midpoint; fi
26
docker build --tag tier/midpoint:latest .
Sep 27, 2018
27
echo "---------------------------------------------------------------------------------------"
28
echo "The midPoint containers were successfully built. To start them, execute the following:"
29
echo ""
30
echo "(for simple demo)"
31
echo ""
32
echo "$ cd" $(normalize_path `pwd`/../demo/simple)
33
echo "$ docker-compose up --build"
34
echo ""
35
echo "(for complex demo)"
36
echo ""
37
echo "$ cd" $(normalize_path `pwd`/../demo/complex)
38
echo "$ docker-compose up --build"
You can’t perform that action at this time.