aboutsummaryrefslogtreecommitdiff
path: root/build/socat/build.sh
blob: fbc70d9e935bf3e822b29289adab215b5f5932b5 (plain) (blame)
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
#!/bin/sh

build=docker
if [ -x "$(command -v buildah)" ] ; then
	build=buildah
fi

run=docker
if [ -x "$(command -v podman)" ] ; then
	run=podman
fi

image="socat-builder"
$build build -t "$image" .


if ! [ -d build ] ; then
		mkdir build;
fi

cp build-int.sh build/build.sh
echo "chown -R $(id -u):$(id -g) /build" >> build/build.sh

$run run --rm -it \
		-v `pwd`/build:/build \
		"$image" \
		sh /build/build.sh