Mercurial > hg > orthanc-gcp
comparison Resources/debian-stable-compile.sh @ 10:340f02ddaabf
build script for Debian stable
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Jun 2019 08:13:01 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:c46ed3cd5ddc | 10:340f02ddaabf |
---|---|
1 #!/bin/bash | |
2 | |
3 ## | |
4 ## This script compiles the plugin for Debian stable, in static | |
5 ## mode. The resulting binaries can be used in the Docker images of | |
6 ## Orthanc, as those are also based on Debian stable: | |
7 ## https://github.com/jodogne/OrthancDocker/blob/master/orthanc/Dockerfile | |
8 ## | |
9 | |
10 set -ex | |
11 | |
12 if [ "$1" != "Debug" -a "$1" != "Release" ]; then | |
13 echo "Please provide build type: Debug or Release" | |
14 exit -1 | |
15 fi | |
16 | |
17 if [ -t 1 ]; then | |
18 # TTY is available => use interactive mode | |
19 DOCKER_FLAGS='-i' | |
20 fi | |
21 | |
22 ROOT_DIR=`dirname $(readlink -f $0)`/.. | |
23 | |
24 # Always make sure we use the latest version of Debian stable | |
25 docker pull debian:stable | |
26 | |
27 mkdir -p ${ROOT_DIR}/debian-stable | |
28 | |
29 docker run -t ${DOCKER_FLAGS} --rm \ | |
30 -v ${ROOT_DIR}:/source:ro \ | |
31 -v ${ROOT_DIR}/debian-stable:/target:rw \ | |
32 debian:stable \ | |
33 bash /source/Resources/debian-stable-internal.sh $1 $(id -u) $(id -g) | |
34 | |
35 ls -l ${ROOT_DIR}/debian-stable/ |