File: containerized-build.sh

package info (click to toggle)
libblkio 1.5.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,016 kB
  • sloc: ansic: 3,443; sh: 432; makefile: 35; python: 16
file content (12 lines) | stat: -rwxr-xr-x 638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
cd "$(dirname $0)"

# Build image, if it doesn't exist or is older than ./Containerfile
if [ $(podman images --noheading --filter reference=libblkio-builder | wc -l) -eq 0 ]; then
    buildah bud --tag libblkio-builder .
elif [ $(podman images --noheading --filter reference=libblkio-builder --filter until=$(date -r ./Containerfile +%s) | wc -l) -ne 0 ]; then
    buildah bud --tag libblkio-builder .
fi

# Disable seccomp so io_uring syscalls are allowed
exec podman run --security-opt=seccomp=unconfined --rm -it --user "$(id --user):$(id --group)" --userns keep-id --volume .:/usr/src/libblkio:z libblkio-builder ./build.sh