-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.sh
executable file
·34 lines (26 loc) · 1.19 KB
/
make.sh
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
#!/bin/sh
############################################################################
# Copyright (c) 2020-2024 Silvio Clecio (silvioprog) <[email protected]>
#
# SPDX-License-Identifier: MIT
############################################################################
set -e
output="$(realpath .)/output"
rm -rf "$output"
mkdir -p "$output"
docker_cmd="docker"
if test -x "$(which podman)"; then
docker_cmd="podman"
fi
echo "Using $docker_cmd ..."
if [ "$(uname)" = "Linux" ]; then
$docker_cmd build --platform=linux/arm64 -f Dockerfile.arm64 -t libsagui-arm64 .
$docker_cmd run --platform=linux/arm64 --rm --privileged -v "$output":/sagui/output -it libsagui-arm64
$docker_cmd build --platform=linux/amd64 -t libsagui .
$docker_cmd run --platform=linux/amd64 --rm --privileged -v "$output":/sagui/output -it libsagui
else
$docker_cmd build --platform linux/arm64 --tls-verify=false -f Dockerfile.arm64 -t libsagui-arm64
$docker_cmd run --platform linux/arm64 --rm --privileged -v "$output":/sagui/output -it libsagui-arm64
$docker_cmd build --platform linux/amd64 --tls-verify=false -t libsagui .
$docker_cmd run --platform linux/amd64 --rm --privileged -v "$output":/sagui/output -it libsagui
fi