File: build.docker.sh

package info (click to toggle)
libcsfml 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,240 kB
  • sloc: cpp: 7,741; ansic: 2,616; sh: 805; makefile: 16
file content (65 lines) | stat: -rwxr-xr-x 1,124 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash

# Automatically exit on error
set -e

if [[ -z "$1" ]]; then
    echo 'No Runtime Identifier specified, running all known RIDs'
    ./build.docker.sh "linux-x64"
    ./build.docker.sh "linux-musl-x64"
    ./build.docker.sh "linux-arm"
    ./build.docker.sh "linux-arm64"
    exit 0
fi

RID="$1"

case "$RID" in

'alpine-x64')
    Image='alpine'
    Shell='/bin/sh'
    ;;

'debian-x64')
    Image='debian'
    Shell='/bin/bash'
    ;;

'fedora-x64')
    Image='fedora'
    Shell='/bin/bash'
    ;;

'linux-x64')
    Image='ubuntu:22.04'
    Shell='/bin/bash'
    ;;

'linux-musl-x64')
    Image='alpine:3.15'
    Shell='/bin/sh'
    ;;

'linux-arm')
    Image='arm32v7/ubuntu:22.04'
    Shell='/bin/bash'
    ;;

'linux-arm64')
    Image='arm64v8/ubuntu:22.04'
    Shell='/bin/bash'
    ;;

*)
    echo "Unknown Runtime Identifier $RID"
    exit 1
    ;;

esac

echo "Building $RID using image $Image with $Shell"

RepoRoot="$(realpath "$(git rev-parse --show-toplevel)")"

docker run --rm --mount "type=bind,source=$RepoRoot,destination=/csfml/" "$Image" "$Shell" -c "cd /csfml/tools/nuget/; ./docker.$RID.sh"