aboutsummaryrefslogtreecommitdiff
blob: 124646aac777156130e03b67cbd1c37d4d4c4a9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
set -ufe
>&2 echo THIS IS A DEVELOPER SCRIPT
>&2 echo YOU DO NOT NEED TO RUN IT UNLESS YOU EDITED seccomp-bpf.c

: "${CC:=gcc}"
: "${CCFLAGS:=$(pkg-config --cflags --libs libseccomp)}"

generator="$(mktemp)"
trap 'rm "${generator}"' EXIT

"${CC}" -o "${generator}" -D_GNU_SOURCE ${CCFLAGS} seccomp-bpf.c && \
	"${generator}" > seccomp-bpf.h