initrd/build-init
Mikaël Cluseau bce1ec14f1 wip
2024-06-29 09:25:11 +02:00

28 lines
448 B
Plaintext
Executable File

set -ex
which podman &>/dev/null && docker=podman || docker=docker
mkdir -p empty
$docker build -t nv-rs-build --network=host -f Dockerfile.build empty
case $1 in
release)
opts=--release
bindir=target/release
;;
"")
bindir=target/debug
;;
*)
echo >&2 "invalid arg: $1"
exit 1
;;
esac
$docker run --rm -i --net=host --user=$UID \
nv-rs-build \
cargo build $opts
mkdir -p dist
cp $bindir/init dist/