annotate Resources/Builders/Debian/docker-bullseye-compile.sh @ 150:3c98306828de

todo cleanup
author Alain Mazy <am@osimis.io>
date Mon, 22 Jan 2024 17:58:48 +0100
parents 81a0975a2479
children 3678a028f1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 echo "Please provide build type: Debug or Release"
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 exit -1
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 if [ -t 1 ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # TTY is available => use interactive mode
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 DOCKER_FLAGS='-i'
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
88
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
17 mkdir -p ${ROOT_DIR}/docker-build-bullseye/
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
88
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
19 docker pull debian:bullseye-slim
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 docker run -t ${DOCKER_FLAGS} --rm \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 -v ${ROOT_DIR}:/source:ro \
88
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
23 -v ${ROOT_DIR}/docker-build-bullseye:/target:rw \
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
24 debian:bullseye-slim \
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
25 bash /source/Resources/Builders/Debian/docker-internal.sh $1 3.9 $(id -u) $(id -g)
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
88
81a0975a2479 distinguishing Debian docker-based builds between buster and bullseye
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
27 ls -lR ${ROOT_DIR}/docker-build-bullseye/