Show More
@@ -1,14 +1,21 b'' | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash -e | |
2 |
|
2 | |||
3 | BUILDDIR=$(dirname $0) |
|
3 | BUILDDIR=$(dirname $0) | |
4 | ROOTDIR=$(cd $BUILDDIR/..; pwd) |
|
4 | ROOTDIR=$(cd $BUILDDIR/..; pwd) | |
5 |
|
5 | |||
6 | if which docker.io >> /dev/null ; then |
|
6 | if which docker.io >> /dev/null 2>&1 ; then | |
7 | DOCKER=docker.io |
|
7 | DOCKER=docker.io | |
8 | elif which docker >> /dev/null ; then |
|
8 | elif which docker >> /dev/null 2>&1 ; then | |
9 | DOCKER=docker |
|
9 | DOCKER=docker | |
|
10 | else | |||
|
11 | echo "Error: docker must be installed" | |||
|
12 | exit 1 | |||
10 | fi |
|
13 | fi | |
11 |
|
14 | |||
|
15 | $DOCKER -h 2> /dev/null | grep -q Jansens && { echo "Error: $DOCKER is the Docking System Tray - install docker.io instead"; exit 1; } | |||
|
16 | $DOCKER version | grep -q "^Client version:" || { echo "Error: unexpected output from \"$DOCKER version\""; exit 1; } | |||
|
17 | $DOCKER version | grep -q "^Server version:" || { echo "Error: could not get docker server version - check it is running and your permissions"; exit 1; } | |||
|
18 | ||||
12 | $DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1 |
|
19 | $DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1 | |
13 | $DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \ |
|
20 | $DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \ | |
14 | "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/" |
|
21 | "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/" |
General Comments 0
You need to be logged in to leave comments.
Login now